Player Self rotation fix/rule

Hi Everyone,

I have a actor which moves along platforms and jumps - I've added a rotation rule but I only want this rule to apply when the object is in the air and not touching the platforms, does anyone have any ideas how to do this?

Thanks

Comments

  • WingmanappsWingmanapps Member Posts: 458
    make a new integer game.attribute called touch
    create a new rule on your actor that moves.

    If actor overlaps or collides with platforms
    Change attribute game.touch to 1
    Otherwise
    Change attribute game.touch to 0

    Put another condition on your rotation rule
    game.touch is = 0
    then rotate
  • DantippleDantipple Member Posts: 12
    Cheers dude
  • DantippleDantipple Member Posts: 12
    Wingmansapps - I've input the code and it works a treat but my next problem is the actor stays at the rotation when it lands - how do I go about resetting this back to its orginal? I've tried rotate to angle, rotate etc and end up with some funny results.

    You help is appreciated!
  • WingmanappsWingmanapps Member Posts: 458
    edited June 2013
    If game.touch is = 1
    Change attribute self.rotation to 0
  • DantippleDantipple Member Posts: 12
    thanks again, worked perfectly
Sign In or Register to comment.