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.

Newcomers DBPro Corner / get object # under my players position?

Author
Message
David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 26th Jul 2006 22:01 Edited at: 26th Jul 2006 22:04
how would i get the object # of whatever objects underneath my player.


example of what im trying to do:

my player walks on a helicopter,jumps off onto a moving truck,now stays on top of the moving truck,jumps off the moving truck onto a moving speed boat. u get the idea.
The end is near
19
Years of Service
User Offline
Joined: 19th Jun 2005
Location: USA
Posted: 26th Jul 2006 23:57


My current savings for the PS3 is: $486.00 out of $600 !!!
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 27th Jul 2006 00:23
Will that work, END?

Sparky's Collision DLL has a raycasting command that does it for you easily though.

Anyway, it depends on what you are using? Is it DBC or DBPro?

Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 27th Jul 2006 01:04
If it's the player you could find what is below the camera by using pick object. Something like this-



David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 27th Jul 2006 03:58
end:your code doesnt work.

Daemon:i doubt that will work.

thanks anyway guys!

ill experiment with sparkys collsion dll & see if it can do this.such a simple thing i want to do,theres got to be a simple answer.
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 27th Jul 2006 05:55 Edited at: 27th Jul 2006 05:56
Use a for/next loop going from every object in your game, then cast an intersection ray below the players object downwards x amount of units. If an intersection occurs with the current object, some part of it is directly below your player. Pseudo;



Or use Sparky's (it's faster). If you use Sparky's, you can assign all of your objects to a group, then just perform one intersection check with that group, and it will return which object from the group is intersected. Would be faster/less lines of code.


Projects: Online CTF Game | Newcommer's Guide to FPS's

Login to post a reply

Server time is: 2024-11-26 16:29:33
Your offset time is: 2024-11-26 16:29:33