Jump to content

Sprite localToGlobal position


Recommended Posts



I have a sprite of a tank, it has an anchor and it rotates around that anchor. I want to create a shot from the tank barrel. I know the offset of the tank barrel hotspot relative to the original sprite. How do I calculate the point where the shot should be generated in the world (i.e. at the barrel hotspot)?

Should I use Point.rotate or is there a better built in method?

(A code snippet would be much appreciated).






Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...