Game Development Community

More collision boxes for vehicles?

by Sangwoo Hong · in Torque Game Engine · 05/30/2006 (10:22 am) · 2 replies

I'd like to add more collision boxes to vehicles not for vehicle physics but to figure out what side of the vehicle I'm standing in so I can choose the correct mount point to mount the player. (Think Warthog in Halo or getting in on the passenger side in Grand Theft Auto.)

It occurs to me I could probably put in a col-2, col-3, etc. but how would I check collision against it if they were present in the vehicle's .dts?

Is there a resource that does this already?

phong.

#1
05/30/2006 (10:37 am)
Why would you need collision boxes for that? Just use some kind of mathematical check to determine which side of the vehicle you're on. Or you could do a check on the players position and/or eye vector from the various mount points to determine which one they should get onto. There's a function like getMountNodeTransform(%slot) (not exactly sure, but do a .dump() on any shapebase class or look it up) that will get you the transform data of any of the mountpoints.
#2
05/31/2006 (8:23 am)
Paul,

Your idea is very sound. However, it seem to me checking distance against all mount nodes could introduce ambiguous situations and iltering out to minimum distance from mount nodes would take too much trial and error. Too messy for my tastes.

That said, I found a thread that mentions using dummies and ray casts. The thread is here:

www.garagegames.com/mg/forums/result.thread.php?qt=19156

I think this is what I'm looking for but I'm not completely clear on what the poster meant by "dummy". Don't dummies get export as transforms in .dts like a point in space. I don't think I can ray cast against a point in space...

I'm sure I'm confused about something here. Can anybody out there clarify?

phong.