playMaker

Author Topic: Set Animator Float Incrementing Float...[SOLVED]  (Read 1821 times)

Raknill

  • Playmaker Newbie
  • *
  • Posts: 20
Set Animator Float Incrementing Float...[SOLVED]
« on: August 02, 2016, 10:39:44 PM »
Frustrating problem here, only because I've had this working before and now I've seem to run into a roadblock.

On my "guard" character, I have a "Speed" variable that is used to determine whether he should be idle/walking/running.

In my "Get Speed" FSM, I'm using a "Get Property" action to grab the velocity.magnitude of the NavMeshAgent, and then using the "Set Animator Float" to set the "Speed" variable equal to it.



Now, the "Set Animator Float" state is incrementing my "Speed" variable and not setting it equal. I've pretty much determined that the "Set Animator Float" action is the culprit, as with it turned off, the "Speed" variable does not increment (this behavior can be seen in the linked video).


Anyone know what's going on?
« Last Edit: November 01, 2016, 02:31:30 AM by jeanfabre »

Raknill

  • Playmaker Newbie
  • *
  • Posts: 20
Re: Set Animator Float Incrementing Float...
« Reply #1 on: August 03, 2016, 01:54:28 AM »
Whelp, I actually figured out the "why", but if someone wants to elaborate on the "how", that would surely be appreciated.

I had a RigidBody attached to my Guard character, and on removing that the variable "Speed" stopped incrementing and behaved as normal. I assume this has something to do with how Unity handles physics.

Don't have a RigidBody on a mecanim animated character!