Jump to content

Parent child rotation


Recommended Posts

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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