Character movement issue #176
long1752062104
started this conversation in
How do I ... ?
Replies: 1 comment
-
There is no character controller implementation in Jitter, just a demo scene within JitterDemo which can serve as a starting point for your own implementation. Have a look into Player.cs how the force is added. You can also implement your player as a "kinetic body", directly modifying the velocity of the rigid body. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When I modified the player's movement speed, I found that the player gradually increased their force while walking, rather than moving smoothly
`Keyboard kb = Keyboard.Instance;
if (kb.IsKeyDown(Keyboard.Key.Left)) player.SetAngularInput(-1.0f);
else if (kb.IsKeyDown(Keyboard.Key.Right)) player.SetAngularInput(1.0f);
else player.SetAngularInput(0.0f);
if (kb.IsKeyDown(Keyboard.Key.Up)) player.SetLinearInput(-JVector.UnitZ * 20f);
else if (kb.IsKeyDown(Keyboard.Key.Down)) player.SetLinearInput(JVector.UnitZ * 20f);
else player.SetLinearInput(JVector.Zero);
if (kb.IsKeyDown(Keyboard.Key.LeftControl)) player.Jump();`
Beta Was this translation helpful? Give feedback.
All reactions