How to rotate to direction of travel?

RHRH Member Posts: 1,079
edited November -1 in Working with GS (Mac)
I really can't figure out how to do this and can't find any tutorials. What I mean is something like that seen in Stunt Squirrels (I'm assuming that the actor is rotating rather than being animated or changing image or something).

Thanks for any help

Comments

  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    Ok, I'm no expert but here goes:

    I know if you want it to rotate to the touch try the behaviour:

    Rotate to Position:
    x =game.touches.touch 1.X
    y = game.touches.touch 1.Y
    of set Angle = 0
    Speed = 150 (or whatever you prefer)
    Relative to scene

    not 100% sure about the following...

    if you simply want it to rotate to the direction it is travelling try

    Rotate to Position:
    x = objects.x position
    y = objects y position
    speed = whatever you like.. 300?

    it may or may not need to be in a timer which goes off every 0.001 seconds, depending what mood GS is in...

    Hope it is of some use... not tried it but fingers crossed.
  • UtopianGamesUtopianGames Member Posts: 5,692
    I have a fish sprite that bounces and moves around and i can't get the rotate to position working :(

    Any ideas guys to get my fish facing the right way?

    Regards,

    Darren.
Sign In or Register to comment.