rgk Posted November 12, 2015 Share Posted November 12, 2015 So I got this interesting problem.I have a parent group, and I place all the sprites within it. I flip scale.x to show left or right. Problem is I also rotate it depending on slopes but shoot a bullet from a cannon that also rotates with the parent. Now I grab the data via worldRotation and shoot a bullet with velocityFromRotation. When the cannon is in the right position it shoots correctly, but when I flip x It shoots still from the right reverse of the left. Any ideas? Aka when flipping the scale.x of the main group. the angle it produces is flipped on the y axis, not x. Link to comment Share on other sites More sharing options...
rgk Posted November 14, 2015 Author Share Posted November 14, 2015 I guess my math has been a little rusty, ended up subtracting Math.PI and making the point.rotate use a negative distance for left. Link to comment Share on other sites More sharing options...
Recommended Posts