- Home /
Question by
craminestudio · Apr 05, 2015 at 07:09 PM ·
standard-assetsaircraft
How to translate AirJet prefab provided in unity standard assets package for unity 4.6?
I am using single joystick prefab to get the user input. I am trying to do the following to translate it to right but it is not doing anything.
function Update () {
if(js1.position.x>0)
transform.Translate(Vector3.right * Time.deltaTime, Camera.main.transform);
} Please help.
Comment
Answer by lordlycastle · Apr 05, 2015 at 07:19 PM
Look at the code provided with the asset. But simply put I don’t think it’ll feel good when you use Translate
, if you want it more jet kind of feel then you should use AddForce
with ForceType as Acceleration
.
Your answer
Follow this Question
Related Questions
Standard Assets 0 Answers
Aircraft sample scenes - Standard Assets 1 Answer
importing standard assets fails 2 Answers
Standard assets broken? 0 Answers
Modifying Waypoint Circuit script 3 Answers