I am now learning tutorial 07 and I notice that the camera cannot move through walls because of the collision response animator.
I am wondering if I can use this animator to handle the collision between scene nodes other than camera. That is, if there are 2 scene nodes on the screen, how to move one node but disallow it to move through the other node?
Could someone please give me an example code?
Thanks a lot!
Collision between scene nodes
Re: Collision between scene nodes
IIRC, collision response animator works for nodes other than camera, you just need to tell them how your node looks like (size ... ) and where is it. Check getCollisionResultPosition and getCollisionTriangle in ISceneNodeAnimatorCollisionResponse please.wsw1231 wrote:I am now learning tutorial 07 and I notice that the camera cannot move through walls because of the collision response animator.
I am wondering if I can use this animator to handle the collision between scene nodes other than camera. That is, if there are 2 scene nodes on the screen, how to move one node but disallow it to move through the other node?
BTW, if you need accurate collision detection (for example, for physics calculation), then you need special collision detection libraries, such as SOLID, Opcode and Bullet.
Regards,
Jiang