- Home /
Spawning mobs in a platformer game
Am creating an infinite runner game and coins/mobs will spawn on my platforms. Currently I have the location of the said entities spawned directly above my platforms like below. The offset value is just me tweaking the value in the inspector.
public float offset;
spawnEntity(entity ,new Vector2(platform.position.x, platform.position.y + offset)
I was wondering is this bad practice with this use of hard values? Would it be affected with changing resolutions or does unity have a way of properly scaling it as the resolution changes?
unity world uses units for coordinate system not pixels. Therefore it wont be affected by resolution
Your answer
![](https://koobas.hobune.stream/wayback/20220612212514im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
I'm trying to make platforms generate between two platforms which are already generated. 0 Answers
2d art - Help 1 Answer
2D platform game stop camera from moving once reach end of screen 1 Answer
I'm having trouble with my character when playing in unity, and when I build and run the game 0 Answers