Question by
$$anonymous$$ · Feb 16, 2016 at 12:59 PM ·
unity 52d gamerigidbody2ddirection
My arrow keep firing backwards 2D game
// To set direction to look.
private void SetLookingDirection() {
v = rb.velocity;
angle = Mathf.Atan2(v.y, v.x) * Mathf.Rad2Deg;
transform.rotation = Quaternion.AngleAxis(angle, Vector3.forward);
}
This is part of my script attached to the arrow but it keeps firing backwards. Any help would be appreciated.
Comment
Yes the arrow is pointing right when it fires so its backwards but when i drag the sprite unto the scene and do a 180 with it then drag it back down to my assets ... then unto the script.. it still fires backwards. So odd.
Doing that won't solve the problem, put the rotated arrow inside a prefab or just simply flip the image itself