Get 8-direction to work with rotating layout?

0 favourites
  • 4 posts
From the Asset Store
Character Sprite Pack: Walk 4 Directions made in illustrator
  • Hey all, got an interesting question.

    At the moment, 8-directional controls always are oriented in the same direction, regardless of rotation of layout. Needless to say, this makes it impossible to use in any games involving rotation of layer/layout.

    So, there are two solutions as far as I can see...

    -1. Someone comes up with a working replication of the behavior, and then we could apply trig. However, I cannot seem to come up with a good imitation of it.

    -2. Ashley adds an 'Angle Offset' property, which adjusts the control direction of the behavior accordingly.

    Any help or advice would be nice!

  • Did you try custom movement? You can pretty much move anyway you want with custom movement.

  • Yeah, but some of the things within 8-directional behavior I can't really seem to figure out, especially the collision with solids.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I did a quick thing in another example - it was custom movement, I just set the movingangle of the objects custom movement to the angle between the colliding object and the ball object.

    The only issue would be if you had a long platform, as it'd go from the wherever the origin was - in which case it'd get a lot more complicated to code. :-/

    Download here

    It is the event where the ball collides with the box.

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