|
Post by vPotato on Aug 25, 2017 22:28:31 GMT
Hey guys, sorry if this has been asked before. I'm not much of a coder. I've searched for this and couldn't find it. Basically what I want to do is replace the falling animation when the character is sliding down a slope with my own animation while orienting the player to face in the direction he's sliding. I've noticed we can "steer" on slopes and I would like to blend to "right/left steering" animations as well as jump while doing this (like older Tomb Raider games).
How would I go about achieving this? Any help would be greatly appreciated.
|
|
|
Post by uberwiggett on Aug 25, 2017 22:57:54 GMT
Top of my head, you'd need to set a new animation state, much like falling already is. You could also try looking at how the swimming state is done for more of an idea. As for how to trigger it in the controller I am not entirely sure from top of my head.
|
|
|
Post by vPotato on Aug 26, 2017 8:51:51 GMT
Thank you. Yes I'll have a look at the swim and zip systems then. This would be such a nice, immersive feature to have. Also opens some doors for 3d Platformer/Adventure styles.
|
|
|
Post by Invector on Aug 27, 2017 13:51:10 GMT
We actually have a method call Sliding() on the vThirdPersonMotor, if you make a Debug.Log(isSliding); you will see the bool turning true when the character is on a surface higher then his slope limit.
Following this logic, you should be able to create a bool on the animator and pass the isSliding value to trigger the animation: animator.SetBool("IsSliding", isSliding);
|
|
JCPereira
New vMember
Let's help each other
Posts: 5
|
Post by JCPereira on Sept 6, 2017 14:20:32 GMT
To Simple Sliding i do this: vThirdPersonAnimator.cs: At LocomotionAnimation() function: Increse: animator.SetBool("IsSliding", isSliding); And at Animator Component from my animator, in this case is shooterMeele, i Add the parameter bool IsSliding and in the machine state Airbone >> Falling >> I Add my Sliding animation and condition to run. Its work for me. (^.~)
|
|