GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

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.Posts: 12,822Member

    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.Posts: 12,822Member
  • jsorr2jsorr2 Posts: 279Member
    edited November 2014

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

    EDIT: Socks beat me to it.

  • shonasenshonasen Posts: 40Member

    @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 Posts: 15Member

    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.Posts: 12,822Member

    @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.