DemoProductions / shmup

3 stars 2 forks source link

Bullet is shot from where the player / enemy gameobject is #125

Open ghost opened 7 years ago

ghost commented 7 years ago

Currently the bullet is shot from where the player / enemy gameobject is or where the weapon gameobject is (since weapon is placed where the player / enemy gameobject is when instantiated).

Set the weapon's position to a sensible position on the new player / enemy sprite

flip40 commented 7 years ago

This is an interesting problem to solve. At present, we don't actually have control over the position in the prefab. Perhaps adding some Editor GUI for a v3 value that allows us to position the weapon relative to the sprite in a way that makes sense would be useful.

Either way, the base problem / solution is that we need a v3 that can be saved in the prefab and used to determine where we spawn the weapon.

flip40 commented 7 years ago

Editing the OP a bit because this issue carries over to all player and enemy sprites (by the way, not sure I ever got around to making an issue for discussing it, but I do notice enemy and players share a lot of traits that we might be able to abstract out).