I am trying to spawn bullet objects randomly along the top edge of a rectangular player controlled object.
The problem is that the player controlled object can rotate a bit in each direction and is therefore at times angled. I have randomized the X coordinate to spawn the bullet at (along the player object top edge), but I am not sure what to do for the Y - it may have to deal with the slope of the angle? but I am not sure.
I have tried to use Image points to spawn the bullets but I would rather not so that I can spawn objects at any random point along the top edge of the player object.
Thanks in advance. I know this has been tough for me to figure out so kudos to whoever gives it a go.