rotate an actor only horizontally 180 degrees

I have used vectorToAngle(game.Touches.Touch1.X-self.Position.X, game.Touches.Touch1.Y-self.Position.Y ) for rotating my actor on touch ,it rotates 360 but i want only 180 degree rotation. Please help thanks in advance.

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    I'm not 100% sure what the question means . . . . ?

    But you could just use interpolate, let me make you an example project, back in 1 minute . . .

  • SocksSocks London, UK.Member Posts: 12,822
  • jsorr2jsorr2 Member Posts: 279
    edited November 2014

    rule:
    if rotation = 180
    constrain actor.rotation to 180

    EDIT: Socks beat me to it.

  • shonasenshonasen Member Posts: 40

    @socks i am unable to open ur sample project it gives "unsupported file format,the file is newer than the this version creator".so can u plz give that lines here.

  • SaladBarCresitaSaladBarCresita Member Posts: 15

    It should also be sufficient to change the "Flip horizontally"-attribute, I guess. I mean, I haven't tried it, but it seems like it might work. Of course, if I understood your question correctly...

  • SocksSocks London, UK.Member Posts: 12,822

    @shonasen said:
    socks i am unable to open ur sample project it gives "unsupported file format,the file is newer than the this version creator".so can u plz give that lines here.

    video:

Sign In or Register to comment.