Is it possible to limit the scene.Camera.Rotation?

TiagoLopesTiagoLopes Member Posts: 3
edited September 2014 in Working with GS (Mac)

Hi. I'm trying to make a game where the scene rotates. To accomplish that I'm using a "Change Atribute" for "scene.Camera.Rotation". When I press Left or Right the scene rotates, but I want the action to stop at 45º or -45º.

I've tried a few things but they haven't worked :/

Is there any way to do this? Thanks in advance.

Best Answers

  • marc_greiffmarc_greiff Posts: 250
    edited September 2014 Accepted Answer

    a few options might work:

    1) use the "rotate to angle" attribute

    2) use the "interpolate" attribtue

    3 constrain scene.Camera.Rotation=scene.Camera.Rotation+1

    4) set up a loop condition with a change attribute inside.

    Loop condition:
    loop unitl scene.Camera.Rotation = 45 (or what ever angle you want to stop at)

    Inside the rule:
    change attribute/scene.Camera.Rotation=scene.Camera.Rotation+1

  • TosanuTosanu Posts: 388
    Accepted Answer

    I notice you say = 45. But wont, at -2 a step, it go from 44 to 46 without touching 45?

Answers

Sign In or Register to comment.