Author Topic: isSliding boolean  (Read 1514 times)


  • 1.2 Beta
  • Playmaker Newbie
  • *
  • Posts: 49
    • View Profile
isSliding boolean
« on: February 28, 2012, 03:48:40 PM »
Is there a way to detect if the player is sliding or not? I looked through the properties under Character Motor (Standard Asset) and did not see anything pertaining to sliding. (Oddly enough, doesn't look like there's even an option to enable/disable sliding at run time.)

Basically, what I'm trying to do here is apply damage to the player if he slides down a cliff side. Because the player is still considered to be grounded when he's sliding down the cliff, I am unable to do a Y-position check before and after being grounded. (This is how I'm handling falling damage when not grounded). If I can figure out a way to decipher whether or not the player is sliding, I can simply apply damage while an "isSliding" boolean is true.

Any help/suggestions here would be very much appreciated is I've been struggling on this one for a while!
Thank you!!


  • Administrator
  • Hero Member
  • *****
  • Posts: 15321
  • Official Playmaker Support
    • View Profile
Re: isSliding boolean
« Reply #1 on: February 28, 2012, 11:10:43 PM »

 I would start by comparing the input and the speed and direction. If for example the user is not pressing any key and the player has speed, this means he is sliding against its will.

  If the user press "move forward" and the speed direction is not exactly aligned with the forward axis, then the drifting is angle between the speed direction and the forward axis.

 does that make sense?