- Home /
Spawn along local axis.
How would I create an object 10 units away from another object along the object's local y axis? Javascript please.
Answer by superluigi · Sep 07, 2014 at 09:15 PM
Instantiate(object, firstObject.transform.up + 10, firstObject.transform.rotation)
Answer by Pangamini · Sep 08, 2014 at 08:43 AM
Instantiate(object, firstObject.transform.up * 10, firstObject.transform.rotation)
Answer by Doyle Dice · Dec 01, 2015 at 04:35 PM
you should spawn the object normally along world axis first,than use rotatearound() to make that object snap on the axis you want.
Your answer
Follow this Question
Related Questions
Checking the distance between an instantiated object and an existing object 1 Answer
instantiate object and align with object surface 2 Answers
Removing A Component From An Instantiated Prefab After X More Are Instantiated 1 Answer
Local vs. Global movement 5 Answers
Referencing instantiated player in camera's Start() 2 Answers