[Request] Car behaviour Is Drifting Condition

0 favourites
  • 6 posts
From the Asset Store
Template for a police car chase game, fully documented in comments and video
  • Hello all,

    I was working on my LD28 entry post-compo version, which uses car behaviour as core mechanic. At this point I noticed car behaviour does not have "is drifting" condition, and similarly "is accelerating, is breaking" conditions. The latter two are easier to check via events, but is drifting requires a more subtle touch.

    I imagine this can be useful in car racing games as well, especially when playing skidding tyre effects.

    Meanwhile, I am open to suggestions of how to do it via events. Thanks :)

  • try if speed is greater than x and is turning hope that'll work

  • sosensible, yep, I manually added IsTurning and tried to use it in a check, and it's working to a point... However, even when turning ends, drifting can continue for a varying duration set by drift recovery property. So even after the turning ends, it still keeps drifting and it doesn't work that way.

    What I have to do is to check that even when the turning is ended, the object is still moving perpendicular to it's current target angle. i.e I have to catch the change in the X/Y direction that should not be happening. My math is very limited, if someone can help that would be great. But I still believe isDrifting can be very useful.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Drifting is just the angle of motion catching up to the angle of the object. If you check to see if the players angle is not equal to the player's moving angle, and speed is greater than 0, that should do it.

  • zatyka that sounds terribly easy, will try it tomorrow (I need to set up the moving angle thing myself as the car behaviour does not have moving angle condition either) and let you know if it works :)

    Thanks.

  • The car behavior has a moving angle expression.

    Object.Car.MovingAngle

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