Reputation: 815
I have a 2D GameObject with a component of Rigidbody 2d, and I want to move it forward based on its rotation (Rigidbody2D.rotation - z angle). How can i create movement Vector2?
Upvotes: 0
Views: 113
Reputation: 3108
It depends what forward is in your game..
Is forward up?
this.transform.position += this.transform.up * Time.deltaTime;
Is forward right?
this.transform.position += this.transform.right * Time.deltaTime;
Upvotes: 1