I’m trying to use this code to move character left/right
rigidBodyComponent.velocity = (movement * movementSpeed) + new Vector3(0, rigidBodyComponent.velocity.y, rigidBodyComponent.velocity.z);
but the issue I’m having is that when the character is in the air and moving left into a wall, gravity doesn’t force it down. Instead they continue to try to move until input is zero;
As you can see in the picture, he is kind of just floating there while input isn’t zero. s soon as movement equals Vector3.zero, the character would fall. Any insight would be very much appreciated.
velocity is not recommended for movement… by setting velocity constant u are forcing body to have constant velocity thus ignoring the effect of gravity force or any other force and in turn all accelerations.