- Home /
How do I make the nose/whole of my spaceship move?
Firstly, I don't mean having it move forward. I mean if you go up, the nose of the ship will go up, go left, and the nose of the ship goes left. At the moment, my ship is just stationary on the screen and I could have easily just stuck a picture there. So how do I make my spaceship move in that manner?
I can get it to move, but it basically looks stationary on the screen. I want it to move, let's say, forward on the screen when I make it go forwards.
Attach a Rigidbody to the game object, and use AddForce() to move it. Or you can move it over time using some form of Lerp() or $$anonymous$$oveTowards().
Answer by MalikDrako · Feb 12, 2013 at 08:04 PM
It sounds like you want a smooth follow camera instead of one as a child object of your ship like this. Take a look at the SmoothFollow script in the Scripts standard assets package, you should be able to adapt it to your needs.
Answer by robertbu · Feb 12, 2013 at 05:44 PM
There are two different ways you can move an object. First you can move or rotate it directly by interacting with the Transform class using methods like Translate(), Rotate(), RotateAround(), or even directly working with the position and rotation. See the Transform Reference Page.
The second way to get an object to move is to use the physics engine. Attach a Rigidbody to the object and use Rigidbody methods like AddForce() and AddTorque() to make an object move. See the Rigidbody Reference Page.
Your answer