- Home /
Question by
ComeSweetDeath · Apr 09, 2014 at 03:32 PM ·
instantiatetransformvector3racing
How to instantiate an object BEHIND my current position?
Hi, so in this driving game, I want to instantiate a mine behind my car.
var mine : GameObject;
Instantiate (mine, transform.position + Vector(0,0,3) , transform.rotation);
But this code makes my mine instantiate (0,0,3) relative to my car's world space, instead of local space. Could someone help me find a solution to this please?
qes21.png
(45.3 kB)
Comment
Best Answer
Answer by Eric5h5 · Apr 09, 2014 at 03:35 PM
transform.position - transform.forward * distance