Jump to content

Group position vs World position


zbzzn
 Share

Recommended Posts

Hi,

 

I am trying to wrap my head around this issue for some time but I keep failing. I probably miss something very important so any help would be appreciated.

 

I have a group and in it sprites. The group and the sprites rotate. At some point I need to create another sprite at some world coordinates based on the position of a sprite within the group. How do I calculate these coordinates.

 

To make my question clear I made this example:

http://jsfiddle.net/zbzzn/4QLhW/

 

You have a two jointed robot (move with cursor keys). When the user presses Space I would like to create a circle at the tip of the blue joint (joint2). 

 

How do I get the world coordinates of the tip of joint2? 

If possible, please add the solution to this fiddle.

 

Thanks,

Boris.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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