[SOLVED] Prevent sliding when colliding...

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
Linaxys
Posts: 47
Joined: Tue Feb 24, 2009 10:46 pm

[SOLVED] Prevent sliding when colliding...

Post by Linaxys »

Hello,
I know there are some little example of jumping, flying around, but I'd like to know how to prevent my character from sliding on the terrain please ?

Is there something to stop the gravity action while he is colliding with the terrain ?

Thanks.
Last edited by Linaxys on Wed Apr 08, 2009 4:48 pm, edited 1 time in total.
Squarefox2
Posts: 67
Joined: Mon Feb 02, 2009 10:19 am

Post by Squarefox2 »

You can set a SlideSpeed while creating a collisionsResponse-Animator.
Try to set it to 0.0 .
Linaxys
Posts: 47
Joined: Tue Feb 24, 2009 10:46 pm

Post by Linaxys »

Thanks for your reply, but it's already set to 0 by default.
Do you have another idea please ?
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post by B@z »

are you using the collision animator for gravitation, or you implemented you own?
if youre implemented, then i think you should switch off the gravity if youre player is on ground, or if its a little higher, then just place it to the ground.
otherways do the gravity.

the collision response animator didnt do this for me, but i dont like when i cant see whats happening x3
Image
Image
Linaxys
Posts: 47
Joined: Tue Feb 24, 2009 10:46 pm

Post by Linaxys »

Well, I think I'm going to implement my own, I didn't know that I was able to do that.

Thanks for the hint !
abhishekdey1985
Posts: 102
Joined: Sat Jan 17, 2009 4:33 am
Location: Pune
Contact:

Post by abhishekdey1985 »

The default value of the gravity is set to core::vector3df(0f,-10f,0f). Make it zero and it should work.
I work on "The Best Real-Time 3D Engine"
Post Reply