I'm trying to figure out how to add/remove gravity to the FPS camera on demand.
As far as i can tell, you make 2 animators.
one animator is CreateCollisionResponseAnimator WITH gravity (Gravity = n )
the other animator is
CreateCollisionResponseAnimator WITHOUT gravity (Gravity = 0)
To toggle gravity ON you would
FPSCamera.RemoveAnimator (Collision Response Animator WITHOUT gravity)
FPSCamera.AddAnimator (Collision Response Animator WITH gravity)
and vice-versa to toggle gravity off.
is there a more efficient way other than adding and removing the entire world collision animators?
i haven't tried the method above yet but, not knowing the details of how animators are handled in Irrlicht, it sounds like it would be very cumbersome.
irrlicht 1.7.2 or irrlicht 1.8.0-Alpha (i can use either one if needed. release 1.7.2 is preferred)
(PS: i hope i'm making sense. i've been up a very long time)
toggle gravity?
-
- Posts: 95
- Joined: Sat Jun 25, 2011 6:15 am
toggle gravity?
_______________________________________________________
You could argue with me all day long about which language is best.
But what it comes down to is:
which language is best for YOU and which language is best for ME.
You could argue with me all day long about which language is best.
But what it comes down to is:
which language is best for YOU and which language is best for ME.
Re: toggle gravity?
Uhm, there's :
in ISceneNodeAnimatorCollisionResponse.
Code: Select all
//! Sets the gravity of the environment.
virtual void setGravity(const core::vector3df& gravity);
Working on game: Marrbles (Currently stopped).