I’m currently working on creating a movement system for my game. And, I’m struggling to create momentum.
Let’s say that you’re moving forward and jumping, and after you jump, you let go of all inputs. Your character will practically instantly stop in the air.
I’d love to create a system where the player will conserve momentum.
For example, the player could be jumping forward, let go of all directional inputs and continue falling forward until they hit the ground. Or they could be moving forward, jump, and have a hard time altering their movement direction mid-air.
I think you get the point, just jumping physics that work the same way as real life.
Unfortunately, I’m relatively new to programming in Lua. I’ve searched far and wide and I can’t find much information on how to do this effectively. Help would be very much appreciated!!
If you have any questions, feel free to ask! Thanks.
The Humanoid Physics Controller looks interesting! Though, I’m a bit confused on how to use it. I’ve enabled beta features, but I can’t actually get it to function correctly.
It would be something like taking the current velocity at any given time and applying that velocity with a set amount of force but at the same time you would have to take other forces away that could mess up the momentum you want. Another thing to remember is unless you program it yourself there is no terminal velocity there is no air resistance
Would it be possible to create an ice-like effect under the player’s feet while they’re in the air?
For example, if you take a part and change it’s custom physical properties to have friction set to 0.004 and friction weight to be set to 100, the player slides around.
Would it be possible to emulate this surface while they player is in the middle of the air?
Oh yeah, you would need to work on either the Humanoids odd static properties (things you can’t change easily) or disable humanoid in some way to apply the physical properties you need during a jump
You could just make parts near or touching the player frictionless by setting their customphysicalproperties, in terms of air motion you increase walkspeed but reduce the force applied