dimanche 4 janvier 2015

Getting the correct movement vector to fire a bullet from a rotated sprite


Vote count:

0




enter image description here


Hi,


I'm using a SKNode to represent a ship sprite. This sprite can be rotated and moved by touch events. This sprite should fire a bullet (another SKNode object) every second.


I plan to use SKAction to move the bullet.


The zRotation method of SKNode objects returns the rotation around the z-Axis. But how can I transform this into the right vector?


Thanks for your help Stefan



asked 41 secs ago

Stefan

610






Getting the correct movement vector to fire a bullet from a rotated sprite

Aucun commentaire:

Enregistrer un commentaire