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 / mouse in 3d

Author
Message
warship45
20
Years of Service
User Offline
Joined: 24th Jul 2004
Location: uk
Posted: 6th Apr 2005 19:03
hi,
i am making an (rpg) like red alert 2 but i am have somepobles with the mouse code. i need to click on a object in 3d space anywhere on the map. i have tryed very hard but still can not get it to work.
please help!!!!
here is my code


http://www.freewebs.com/dbpro/index.htm
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 6th Apr 2005 23:23 Edited at: 6th Apr 2005 23:27
Hmm, this is actually the 3D modelling board. This question would be better posted in the main DB or DBP discussion boards.

if pick object(mousex(),mousey(),0,1000)=1

If you read the description for the command PICK OBJECT, it says that it returns the object ID. So, your code will only print "hit" if object 1 is pointed at. Try this...


--
TAZ

"Do you think it is wise to provoke him?" "It's what I do." -- Stargate SG-1
warship45
20
Years of Service
User Offline
Joined: 24th Jul 2004
Location: uk
Posted: 7th Apr 2005 03:29
thanks for that but is still does not work. well it does work but only when i am about one cm in frount of the object not on the object it self. please help me fix this if you can.

http://www.freewebs.com/dbpro/index.htm
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 7th Apr 2005 06:36
Sigh, I should have shut up while I was ahead.

I can't run your program due to external resources. So, I can only look at your code and make an educated guess. It could very well be that your zombie model (objectID = 1) has some funky offsets that might be affecting object picking.
--
TAZ

"Do you think it is wise to provoke him?" "It's what I do." -- Stargate SG-1
warship45
20
Years of Service
User Offline
Joined: 24th Jul 2004
Location: uk
Posted: 7th Apr 2005 17:00
ok,
thanks for all your help because of you i have fix the it now.
here is how i did it.
if pick object(mousex(),mousey()+30,0,1000)=1
by me adding in the 30 it sorted it self out now it works when ever i click on the object.

thanks a lot

http://www.freewebs.com/dbpro/index.htm

Login to post a reply

Server time is: 2024-11-27 20:48:27
Your offset time is: 2024-11-27 20:48:27