Isometric rotation

0 favourites
  • 3 posts
From the Asset Store
Isometric Vehicle Pack 01. 4 Isometric Vehicles in 2 different colors.
  • I was wondering if anyone knew a way to rotate a isometric background when the player moves?

    I have tried to set the background to the rotate behaviour that when player moves left, background rotates clockwise, and when player moves right, background rotates counterclockwise.

    But once again I dont want the background to exceed a certain angle (as in I dont want my isometric background to rotate past a certain degree).

    The pseudo code would look something like this:

    If player moves left, then rotate Isometric background clockwise 1 degree

    if background angle = 180 degrees then lock background angle

    If player moves right, then rotate Isometric background counterclockwise 1 degree

    if backround angle = 180 then lock background angle

    By lock I mean the background stops rotating past 180 degrees and wont go above that.

    I want to use a "half-rotation" effect to kinda simulate 2.5D on a isometric game, but am having some trouble thinking this through. Is there a way to save the angle of the background to a global variable, so that I can compare the angle to the value in a variable?

    I was also wondering if anyone had any concept ideas, calculations, Capx files or algorithm that they would be willing to share?

    Any help would be appreciated

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I tend to use an easing effect rather than locking...so use two separate events..

    Event 1

    1st condition-> player presses left,

    2nd condition-> if background angle =or <= 180 degrees

    3rd condition-> every tick

    Action-> rotate Isometric background towards required angle 1 degree

    Event 2

    1st condition-> player presses left,

    2nd condition-> if background angle >= 180 degrees

    3rd condition-> every tick

    Action-> rotate toward 180 1 degree..

    and of course repeat for the right side.

    It can also have an eased snap back to original position by removing the player presses key condition and setting the rotate towards angle to the original..

    by using rotate rather than lock its a softer feel and uses the less than or equal to functions..but it sound like you are only rotating the screen as a fake isometric rotation..you could always make a few version of the background art at various angles to get a more realistic view

  • I tend to use an easing effect rather than locking...so use two separate events..

    Event 1

    1st condition-> player presses left,

    2nd condition-> if background angle =or <= 180 degrees

    3rd condition-> every tick

    Action-> rotate Isometric background towards required angle 1 degree

    Event 2

    1st condition-> player presses left,

    2nd condition-> if background angle >= 180 degrees

    3rd condition-> every tick

    Action-> rotate toward 180 1 degree..

    and of course repeat for the right side.

    It can also have an eased snap back to original position by removing the player presses key condition and setting the rotate towards angle to the original..

    by using rotate rather than lock its a softer feel and uses the less than or equal to functions..but it sound like you are only rotating the screen as a fake isometric rotation..you could always make a few version of the background art at various angles to get a more realistic view

    Thanks alot, ill definetly try this out

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)