Hello!
How would I keep an Entity from sliding? I want the player to be able to move then immediately stop when they release the button. I'm moving it by adding to LinearVelocity's X and Z value. I tried changing Kinetic and Static Friction, but I keep sliding. How would I stop the player from sliding as soon as the button is released? Thanks!
Stop Entity from Sliding
Re: Stop Entity from Sliding
Setting an object's linear velocity to zero will instantly stop it.
If the object in question is supposed to behave like a character, you may end up with better behavior by using the CharacterController. It has the usual FPS-style control with configurable speeds/accelerations, among other things.
If the object in question is supposed to behave like a character, you may end up with better behavior by using the CharacterController. It has the usual FPS-style control with configurable speeds/accelerations, among other things.
Re: Stop Entity from Sliding
Hello!
I tried using CharacterController (had to try to port it) and after I thought I was done, 200 more errors came up lol. How does the character controller deal with sliding and friction?
Thanks
I tried using CharacterController (had to try to port it) and after I thought I was done, 200 more errors came up lol. How does the character controller deal with sliding and friction?
Thanks
Re: Stop Entity from Sliding
It has a 'HorizontalMotionConstraint' which supports maximum speed and acceleration properties for different character states. While you could create a system which handles maximum speed and acceleration with just direct linear velocity modifications, the constraint is more robust because it properly interacts with dynamic support objects and handles some other corner cases (e.g. sliding on slopes or in rotating frames of reference).