- Home /
Instantiation in a negative position relative to player
Ok, i understand (for the most part at least) instantiating, and i can chose where i want my objct to be created relative to the player, using something like this
GameObject bomb = Instantiate(bombPrefab, (transform.position) + transform.forward * 2, Quaternion.identity) as GameObject;
This will create the obejct 2 units infront of the player, or whatever number i specify. So i thought it would be as simple as changing it to something like this, with a negative value.
GameObject glueClone = Instantiate(glue, (transform.position) + transform.forward * -3, Quaternion.identity)as GameObject ;
Now it does clone the object behind the player, but not with the specified units, ie its always one unit behind regardless of value. Now it might be something stoopid :\ but i cant seem to see the problem. Some fresh eyes and more experience might help. So please be a sport and help me out
What if you try:
`transform.position - transform.forward*3 ?
Your answer
Follow this Question
Related Questions
Translate a 2D position to a 3D space 1 Answer
instantiated GameObject Prefab jumps in air after instantiate 1 Answer
Gizmos render with an offset, but editor still displays the "right" transform.position 0 Answers
How can I naming each instantiated object in "for" loop ? 1 Answer
How to get position of instantiated object before it is destroyed 2 Answers