Tracking speed and moving angle.

0 favourites
  • 4 posts
From the Asset Store
3D Car Pack 1
$2.99 USD
3D models + Rendered Low-Poly Cars in isometric, top-down, and side angles.
  • Sup, how you doing?

    This is my first post and I wanna be as much objective as I can.

    I've done a game where my player uses something like this setup of keybinds and behaviors to move:

    <img src="https://www.scirra.com/images/articles/OriginalExample.PNG" border="0" />

    The problem is that there are clients comunicating and the angle of motion of custommovement is always right, ->, (0?). I think it is that way because I am not using customM behavior to rotate the Player.

    My question is, how to track my motion [moving angle and speed] without Player.CustomMovement?

    I've been trying something on Vectors, but without much sucess.

    Thanks you for you attention.

    Cya

  • Well, I managed to understand that .dx and .dy are vectors, but the problem persists as there is no .dy being tracked.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Custom movement deals with movement. This means that if you use the sprite's normal angle movement actions, it doesn't affect the MOVEMENT angle, just the angle the object is facing. This is akin to a player being able to move and turn to shoot while moving in the same direction. The rotate actions on the custom movement behavior affect the MOVEMENT of the object, and NOT *direction* (where it's facing).

    It would seem that simply using the "set angle of motion" action to set the sprite's movement angle to the sprite's visual angle (where it's facing) will produce what you need.

  • Joyful, I was in the same assumption while posting this, but now I have reworked my server and It is not only working as intended, but also using angle and "direction" as the same thing.

    Well, problem solved.

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