Get a player sprite to move relative to a vehicle or object instead of the layout

0 favourites
  • 5 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • I’m building a space game where your player pilots a ship around a massive and largely empty area of space. The player boards their space ship, enters commands in a console, then the ship flies in the instructed direction. As long as the player is on board the ship, they move and rotate with the ship and the game window rotates to match the orientation of the ship. When the player moves, they move inside the ship but keep the relative speed of the ship as well. Does anyone know what behaviors/math is required to make this work?

  • so they are basically on a rotating top-down platform? I think it would be awkward to change relative perspective unless you have a different view than that.

  • so they are basically on a rotating top-down platform? I think it would be awkward to change relative perspective unless you have a different view than that.

    It's not the camera angle that the issue is. What I'm struggling with this is getting the player sprite to maintain its position relative to the ship while still being able to move around it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a demo, which is pretty basic, but maybe you can adjust it to your game:

    howtoconstructdemos.com/relative-movement-on-another-moving-object-capx

  • ah, so the ship is moving/rotating, so you want to always have the player's base movement be linked to what they are standing on.

    so for that I would add the same behavior that the 'platform' uses and add that to the player - in addition to any other movement types. you can add multiple movement types to achieve the desired effect. The only restriction would be if you used physics movement type since that's a different beast all together.

    The only other piece is the angle of the player, if the ship rotates you will need to rotate the player with it... but does your player movement also rotate the player?

    How do you move the ship? behaviors etc..?

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