- Home /
Offset Position
I don't know why, but I always have problems with these kind of situations.
Basically, I have an enemy that blows up when killed, and all I want to do, is to offset the initiated explosion's position on the Y axis by 2.
So I have this:
var position = transform.position;
Instantiate (explosion, position, transform.rotation);
And what I want is basically: transform.position.y + 2;
Thanks
Answer by BiG · Aug 31, 2011 at 01:23 PM
I hope to having understand the question... Did you mean this?
Instantiate(explosion, Vector3(pos.x,pos.y+2,pos.z), transform.rotation);
Your answer
Follow this Question
Related Questions
I need help with the location of instatiated objects on the scene and correct interaction with this 2 Answers
Help! I want to make a following camera but in with Y position is constant ? 2 Answers
How can I Instantiate a prefab (projectile) consistently from the character? 0 Answers
Copy position from one object to another on one axis 0 Answers
Instance child global position 1 Answer