Collision between scene nodes

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
wsw1231
Posts: 148
Joined: Fri Oct 01, 2010 7:55 am

Collision between scene nodes

Post by wsw1231 »

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!
Jiang
Posts: 77
Joined: Tue Feb 20, 2007 11:03 am

Re: Collision between scene nodes

Post by Jiang »

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?
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.

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
Post Reply