zbzzn Posted December 11, 2013 Share Posted December 11, 2013 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 More sharing options...
rich Posted December 12, 2013 Share Posted December 12, 2013 Use:x = worldTransform[2]y = worldTransform[5] Link to comment Share on other sites More sharing options...
zbzzn Posted December 13, 2013 Author Share Posted December 13, 2013 Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts