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.

DarkBASIC Discussion / collision with individual limbs with sparky's

Author
Message
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 9th May 2009 18:50
How can I return the limb number of an X object that has been detected by a ray from sparky's DLL?

TheComet

Peachy, and the Chaos of the Gems

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 10th May 2009 00:14
Sparky's DLL uses make memblock from mesh to figure out the polygons for collision detection. When you use that command, limbs and all are converted to 1 mesh so there won't be any individual limb indication. One way to get the limb collision, you would have to know before hand the size, bounds, and rotations of each limb. You'd then have to know the relative position and rotation of the limb to the main body in the world. You'd then get the x,y and z static collision point from sparkys and see if the collision took place within your calculated limb area.

If your object was animated, you'd have to update sparky's before every collision check.

Enjoy your day.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 14th May 2009 21:10
Hmm, well, what I want my waypoint editor to have is the option of hiding polygons of the level so you can see other layers of a multi layered X model. For example I want to put waypoints on top of my house, and then for placing waypoints in my house I would have to hide the roof polygons.

How could I find the vertices of an object? If I could find them, I could do what you said.

TheComet

Peachy, and the Chaos of the Gems

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 14th May 2009 21:55
It can get complicated to get accurate limb collision using the vertices - possible - but complicated.

You may be able to save yourself a few head-aches by attaching a "handle" object to the limb position. By clicking on this handle, you access the limb. Don't use glue object, use



The handle could be anything - a cube, a sphere - your own custom hand grip thing. The idea is to click on the handle and have that collision detection tied by code to the limb you want to select.

Enjoy your day.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 14th May 2009 22:00
So easy, and so clever!

Thanks a lot! I will do that.

TheComet

Peachy, and the Chaos of the Gems

Login to post a reply

Server time is: 2025-05-15 23:16:20
Your offset time is: 2025-05-15 23:16:20