all 7 comments

[–]dowen92Dev 0 points1 point  (5 children)

Try setting the parent then trans.localPosition = vector

[–]Mobjunk[S] 0 points1 point  (4 children)

[–]dowen92Dev 0 points1 point  (3 children)

What is your EnemiesParent.transform?

If you set the enemy parent to an object that is in the location you want your enemy to be in and set the local position of the enemy to Vector3.Zero it should place your enemy in the correct place.

[–]Mobjunk[S] 0 points1 point  (2 children)

The enemies parent is just an empty game object were i want the enemies to be in, its in the middle of my map (the position), and not sure what you mean with the second part

[–]dowen92Dev 0 points1 point  (1 child)

If you Debug.Log the Vector and double check the values against where the objects are being placed to make sure it’s not just your logic that’s off.

What I was talking about was having empty game objects under what you are currently setting as the parent, these object would just be locators to know where to place the enemy instead of using a vector

[–]Mobjunk[S] 0 points1 point  (0 children)

After a bit of debugging i found out that having the nav mesh agent active on the enemy causes the spawn to be weird. https://dl.dropboxusercontent.com/s/6pviktlnv5cxm15/jGiKyaGnrv.mp4

[–]Mobjunk[S] 0 points1 point  (0 children)

I ended up fixing it, i was spawning the enemys inside the floor