Rotating an image?

AdnanHAdnanH Member Posts: 77

Well basically im working on a game which requires moving an actor up down left and right but im stuck as i cant make the image rotate? for example when told to move up i want it to look upwards when down i want it to look downwards etc.. i cant figure out what i would need to write up as the code?

Comments

  • LumpAppsLumpApps Member Posts: 2,881

    In case you use a move behaviour to make it move you can use the following constrained behaviour:

    constrain self.Rotation to vectorToAngle( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y )

  • AdnanHAdnanH Member Posts: 77

    ive put my code like this but its still the same? ive done it to all four code areas to move it up down left and right..

  • LumpAppsLumpApps Member Posts: 2,881
    edited August 2014

    Move Relative to: scene

    Edit: example attached

  • AdnanHAdnanH Member Posts: 77

    Perfect Mate Thanks thats sorted it out!!:) this can now be closed

Sign In or Register to comment.