8 direction behavior - isometric movement

0 favourites
  • 3 posts
From the Asset Store
Rotate & Animation for 16 Direction & Mouse Direction
  • Maybe anyone else know this problem.

    With 8-direction behavior enabled, the collisions work properly, but as soon as I create my own movement it acts a little glitchy, tries to glitch through sprites etc.

    I want to setup isometric movement via:

    up-arrow is down - (sprite.y-1 & sprite.x + 2) etc....

    I tried it via 8-direction behavior and simulate controls, to simultaneously press up and right arrow. Seperated them and added +40 speed to the "left" one. But of course it won't act properly.

    The movement was isometric but the camera was suddenly shifting to this direction^^.

    Back to my question: Is it possible to make a copy of the 8-direction behavior and change its movement to isometric style?

    I looked into the behavior but javascript is still too much for me :/

  • Try Construct 3

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

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

    You can try to modify the behavior, but there is no real need for this. Instead, just set the "default controls" to "No" in the behavior properties. In your event sheet, use the "Simulate contol" action on your sprite.

    For example, in case the "up" key is down, you can simulate "up" and "right" controls, moving in diagonal.

    The problem with this is that you will only move on the perfect diagonal (45?). If you want to move faster on the X axis than on the Y one, you can add a second 8 direction behaviour on the sprite, simulate its controls too, and set its speed differently, so one behaviour moves the sprite on the X axis, the other on the Y one.

    (I'm not a pro on isometric movement, but this seemed to do the trick for me)

  • Thanks, that works pretty well :)

    I doubled the acc. dec. and max speed for the left right behavior.

    Awesome :D

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