Sometimes my character (which has a Rigidbody and is a Capsule) will randomly start moving towards the ‘sky’ when he collides with walls (which are cubes scales to look like walls) and sometimes even when he’s just casually walking on a flat cube.
Also, if I move into a wall and continuously move towards it, I’ll start to ascend the wall…
I’m not using the standard Move script that comes with Unity…I’m using this, if it matters, and I have another Awake() script that sets my framerate to 30:
EDIT: Not sure why the code isn’t showing properly…
var MoveSpeed:float = 8.5;
var translation:float = 0; //Forward/Backward Movement (See Below)
var translation2:float = 0; //Left/Right Movement (See Below)
var multiplier:float = 1; //Adding multiplier bonus will make you move a percentage faster, for example +.15 multiplier is 15% faster MS. You can also decrease it under 1 to move slower.
function FixedUpdate()
{
//1 = Moving Forward, -1 = Moving Backwards, 0 = Not Moving Forward or Backward
if (Input.GetKey(“w”) == true && Input.GetKey(“s”) == false) {translation = multiplier;}
if (Input.GetKey(“s”) == true && Input.GetKey(“w”) == false) {translation = -multiplier;}
if (Input.GetKey(“w”) == false && Input.GetKey(“s”) == false) {translation = 0;}
//1 = Moving Right, -1 = Moving Left, 0 = Not Moving Left or Right
if (Input.GetKey(“a”) == true && Input.GetKey(“d”) == false) {translation2 = -multiplier;}
if (Input.GetKey(“d”) == true && Input.GetKey(“a”) == false) {translation2 = multiplier;}
if (Input.GetKey(“a”) == false && Input.GetKey(“d”) == false) {translation2 = 0;}
transform.Translate (0, 0, ((translation * (MoveSpeed / 30))));
transform.Translate((translation2 * (MoveSpeed / 30)),0,0);
}