GameDemon Posted October 26, 2015 Share Posted October 26, 2015 Is it possible to link a second sprite to a body (that has its own sprite), so that it follows it around? I want the second sprite to have the same rotation,x,y etc, but it's not a physics body. There will be other sprites/bodies between them in terms of the scene graph/z-layers. Link to comment Share on other sites More sharing options...
GameDemon Posted October 29, 2015 Author Share Posted October 29, 2015 I saw that this is possible with preUpdate:sprite.preUpdate = function(){sprite2.x = sprite.body.x;sprite2.y = sprite.body.y;}The second sprite seems to lag by one frame though, and is there a better way to do this? Link to comment Share on other sites More sharing options...
Recommended Posts