Custom Space type movement problems

0 favourites
  • 2 posts
From the Asset Store
Change delay, create new lines, "backspace" the text
  • Hi,

    I'm trying to create a space type movement using the bullet behavior (similar to SPAZ), I have pretty much got it apart from a sudden jump when moving from one direction to another.

    Check out the following;

    dropbox.com/s/7njufpi5j9hsq9s/custom.capx

    Use the arrow keys to move, UP arrow always points towards the mouse, left and right strafe. Problem is It's not very smooth when you change directions, I have added the rotate 20 degrees in the up event which does help but, it will not work in any other direction. I have successfully added a lerp to the speed, still trying to get my head around how this works :)

    Any help would be great.

    Cheers,

    Dave

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm not exactly sure how you want your movement to be. I took a look in your capx and here are some remarks :

    • instead of positioning your upper part over the lower every tick, use the Pin behavior.
    • if I understand space type movement, you should do multiple bullets behavior. The first will be the "booster". The others will be the straffs. Pushing left and right would increase/decrease the power of the straffs, making it strife left and right. Pushing up would increase the speed.

    Here is a capx doing this. The angle jump isn't here anymore.

    capx

    EDIT : i added more details in the code. To be clear, the problem you had was that rotating the lower part 90? when the left / right was pushed made the ship do a clean 90? angle in space, strange. Straff is here to help simulate that. I think the better way though would be to go with the physic behavior, and apply forces on acceleration/deceleration and side pushes.

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