Gravity and ISceneNodeAnimatorCollisionResponse

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
toc
Posts: 5
Joined: Mon May 22, 2006 3:17 am

Gravity and ISceneNodeAnimatorCollisionResponse

Post by toc »

Hi again,

I'm currently having trouble with Gravity and animators at the moment. Basically, I want to make some items alter gravity when you collect them, going from (0, -0.35, 0) to (0, +0.05, 0) - ie normal to slowly floating upwards.

I have a ISceneNodeAnimatorCollisionResponse defined globally and attatched to the camera, with gravity set to normal.

Originally, I was approaching this problem by creating a new animator containing lower gravity when the player collected the item, removing all animators attatched to camera, and then attatching the new one. This works exactly as it should - when the player collects the item, the gravity changes so that they slowly float up from the roof.

However, this was just a temporary measure, and I've been playing around with the SetGravity method. Unfortunately it's not working quite as expected. When the player collects the item, they immediately shoot up to the roof, (or up in to the sky if outside) at a rapid speed. You also can't move against it. It's as if I've set it to a very high positive gravity.

Any help on this issue? Thanks!
DriftRS
Posts: 8
Joined: Mon May 22, 2006 7:21 am

Post by DriftRS »

I'm having the same problem, I'm unable to change the gravity on an animator after it has been created, instead I'm having to create a new animator.

Anyone know how to just change the gravity on an already existing one?
Post Reply