How do I smooth out player rotation

0 favourites
  • 4 posts
From the Asset Store
Players follower. use it for anything which follows the player
  • Hi all,

    I'm making a top down maze game and just need a few pointers setting up the player character.

    I'd like the player to rotate smoothly around the 360 axis with 8 directions of movement and have tried various settings.

    Currently I have it set as:

    8Direction

    Max Speed: 100

    Acceleration: 60

    Deceleration: 1000

    Directions: 8 directions

    Set angle: 360 degree (smooth)

    Default controls: Yes

    Initial state: Enabled

    The controls will be 4 direction arrow sprites on screen.

    When you press say from up to down the character flips instantly to that direction, I'd like this to be a smooth rotation if possible?

    Also I noticed that if you hold down a direction and press another direction at the same time, occasionally the player will keep moving on it's own in that direction, is this a known fault?

    Thanks in advance

    Alex

  • The 360 rotation is designed more for the sprite to be a car like sprite. You only have one sprite and it will rotate smoothly around a single image point usually centered.

    Set your player sprite to behavior car and try that.

    The keyboard reads last key pressed so it sounds like you need an event to check if a key was released and use a variable to keep track.

  • Thanks LaMar, that's much better!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks LaMar, that's much better!

    You are very welcome!

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