#My enemy spawn in the middle of the map outside of the camera
17 messages · Page 1 of 1 (latest)
Well in the method getRandomSpawnPosition it returns spawnPosition and in the method SpawnObject it sets a vector2 to getRandomSpawnPosition
and it instantiates a gameObject at spawnPosition
Okay
do you know how I can fix it.
but the spawn position is just a box around the origin (0, 0). because you're generating random numbers like -10 to 10
does this make sense?
@weary kite
You need to offset the position generated by the camera position