Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

3 Dimensional Chat / Trouble using the dbPickObject() function?

Author
Message
Patsfanx247
9
Years of Service
User Offline
Joined: 3rd Dec 2013
Location:
Posted: 3rd Dec 2013 14:45
I am attempting to use the dbPickObject() function uses the mouse as the pointer to kill zombies that come after you. Although, when I use this function it only recognizes if an object was clicked when it is really close to the camera in a 3d world.

void fireWeapon(int objectEnd)
{
int objectNumber;
objectNumber=dbPickObject(dbMouseX(),dbMouseY(),4,objectEnd);
if(objectNumber>=4)
{
dbHideObject(objectNumber);
}

}

I implement the function by

if(dbMouseClick()==1)
newPlayer.fireWeapon(54);

can someone help me use this function or if anyone has any better ideas?

Login to post a reply

Server time is: 2022-12-09 09:20:21
Your offset time is: 2022-12-09 09:20:21