Set correct angle according to platform

0 favourites
  • 4 posts
From the Asset Store
Wanting to do a Shot n Run game easily? Here is your chance!
  • I have a Character jumping around which attaches to various platforms (not platform behavior) .

    When it attaches it should face away from the platform it lands on. See picture below.

    https://www.dropbox.com/s/qhysoufvwm15a2q/anglePlat.jpg?dl=0

    Set Characters angle to platforms angle only works one way ofc.

    I can't seem to find a good workaround to get it right from both sides?

    Any suggestions?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    How about:

    when character is ON FLOOR set angle to ZERO

    (or is touching platform)

    (or is attached to platform)

    or:

    character angle = platform angle - 90

    or:

    when character is above platform then X angle

    when character is below platform then Y angle

    hope that works, otherwise i need to also understand how exactly do you attach to the platform.

  • "when character is above platform then X angle

    when character is below platform then Y angle"

    What about left and right? It needs to set the angle so it's facing exacly away from the platform.

  • left and right are only from your perspective

    from the perspective of the character he is either above the platform or below it

    but that said you can call it whatever words you like, left, right, up, down, it does not matter, it only matters under which condition which angle should the character have

    you could even pin invisible sprites above and below the platform and make one blue and another red and say when the character is overlapping blue then X and if he is overlapping red then Y

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