Question by
gkfang · May 23, 2016 at 01:57 PM ·
movementspace shooterrigidbody.velocity
Rigidbody.velocity is rotating instead of moving my character?
I'm using a tutorial here: https://unity3d.com/earn/tutorials/projects/space-shooter/moving-the-player and here's my code
public float speed;
private Rigidbody rb;
void Start()
{
rb = GetComponent<Rigidbody>();
}
void FixedUpdate()
{
float moveHorizontal = Input.GetAxis("Horizontal");
float moveVertical = Input.GetAxis("Vertical");
Vector3 movement = new Vector3 (moveHorizontal, 0.0f, moveVertical);
rb.velocity = movement;
}
It's rotating the character I imported instead of moving it horizontally and vertically. What am I doing wrong?
Comment
Your answer

Follow this Question
Related Questions
Rigidbody2D.velocity Won't Move Object 3 Answers
Moving and Rotating Rigidbody in a responsive way 2 Answers
Space shooter tutorial, space ship keep moving and has interia 1 Answer
Space Shooter Tutorial, Player Movement and Boundaries 0 Answers
First Person Slide in direction of rigidbody movement and not look direction 1 Answer