private void UpdatePhysics() { DevMath.Vector2 forceDirection = new DevMath.Vector2(-Input.GetAxis("Horizontal"), Input.GetAxis("Vertical")); rigidbody.AddForce(forceDirection, Time.deltaTime); Position += rigidbody.Velocity; }
private void UpdatePhysics() { DevMath.Vector2 forceDirection = new DevMath.Vector2(-Input.GetAxis("Horizontal"), Input.GetAxis("Vertical")); rigidbody.AddForce(forceDirection.Normalized, Time.deltaTime); Position += rigidbody.Velocity /** Time.deltaTime*/; // Velocity is in meter per seconde, dus moet je het nog keer deltaTime doen. }