Hello,
I have one big problem with moving my helicopter into right direction(its simple slideshooter with 3d object and I dont wanna change that).
Originaly, model of this object is not faced properly (it lies on the side) so I rotated it with unity and now it has Rotation :
x:270
y:180
z:0
With those properties, my helicopter is faced forward, but… But now my script doesnt work properly ![]()
When I had simple Cube it was like:
void Update ()
{
#region moving object
//player move
float moveLeftRight = Input.GetAxis("Horizontal") * playerSpeed * Time.deltaTime;
transform.Translate(Vector3.right * moveLeftRight);
float moveUpDown = Input.GetAxis("Vertical") * playerSpeed * Time.deltaTime;
transform.Translate(Vector3.up * moveUpDown);
With this code:
- when I press left/right on keyboard, object move forward/backward
- when I press up/down on keyboard, object move in Z direction :E
I changed Vector3.right to Vector3.left and this work, but still can’t move my object in Y direction :/.
Object is kinematic and dont use gravity.
What should I change?