Raycaster with addForceAtPos

Grom

09-02-2007 10:04:13

I've implemented a simple shooting example where you can shoot boxes with a gun. (thanks to this library it took me approximately 5 minutes)

What I'm wondering now is if there is a way to use the rayCaster to determine the position of intersection with the body, such that I can use addForceAtPos instead of just addForce.

betajaen

09-02-2007 11:04:15

Do you mean raycast the body, then from the position it hit - Add the force there?

Yes, basically it's exactly what I said in code even the methods and classes are the same.

Grom

09-02-2007 11:39:03

oh using the rayCaster::mHitPos... I didn't even see that...

maybe i've been programming for too long tonight

thanks for the help!