Is there an easy way to flip object body?

edited March 2012 in Help request
I have an object which I want to flip with a button press. The thing is when I use orxObject_SetFlip() it only flips the texture but not the object body parts (which results in false hit detection). Is there any easy way to flip the body?

Comments

  • edited March 2012
    Hi !

    I'm not sure it's a solution, but maybe you can set the Pivot in the center of your object. I think in that case, it will be my first try ;)

    EDIT: and I thing that my second try will be to negative scale the object.
  • edited March 2012
    I'd go with a negative scale too, but careful it's going to affect all coordinate-related calls, including speed, children, etc...

    If you want to make sure you don't get any side effect, you can also move the collision shapes or have 2 sets of shapes, and only activate the set corresponding to the current orientation (to enable/disable the shapes, simply change their flags, when set to 0 it will not collide with any body else).
Sign In or Register to comment.