Landmine is spawning with wrong rotation
I have my weapon set so that it spawns a landmine behind me but the landmine that is attached to me is flat whereas the instance that spawns is lodged sideways into the ground, how can I make it spawn with the correct orientation? I have tried changing the transform.rotation to a transform.rotate or adding a Vector3 with the rotation co-ordinates to the end of the transform.rotation with a = sign but neither worked
Example: http://i.imgur.com/ACv4J8v.png
spawn code:
var mine : GameObject;
function Update() {
if(Input.GetButtonUp("space"))
Instantiate(mine, transform.position, transform.rotation);
}
Your answer
Follow this Question
Related Questions
How to spawn a navmeshagent on a certain nav mesh? 1 Answer
how could I spwan a prefab and then have it propelled foward as if thrown? 1 Answer
Spawn a box and when i press space drop that box 0 Answers
Infinite instantiation w/ for loop? Please help! 1 Answer
How to spawn in precise interval for moving objects 0 Answers