Author Topic: Cannot use 'velocity' on a static body - warning message  (Read 2141 times)

Andreas Tabak

  • Playmaker Newbie
  • *
  • Posts: 9
Cannot use 'velocity' on a static body - warning message
« on: April 26, 2019, 10:01:16 AM »
Hi everyone,

I'm having a strange warning message that seems to pop-up all the time in Unity.

Code: [Select]
Cannot use 'velocity' on a static body.
HutongGames.PlayMaker.Actions.SetVelocity2d:DoSetVelocity() (at Assets/PlayMaker/Actions/Physics2D/SetVelocity2d.cs:95)
HutongGames.PlayMaker.Actions.SetVelocity2d:OnFixedUpdate() (at Assets/PlayMaker/Actions/Physics2D/SetVelocity2d.cs:58)
HutongGames.PlayMaker.FsmState:OnFixedUpdate() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/FsmState.cs:246)
HutongGames.PlayMaker.Fsm:FixedUpdateState(FsmState) (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2776)
HutongGames.PlayMaker.Fsm:FixedUpdate() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/Classes/Fsm.cs:2080)
PlayMakerFixedUpdate:FixedUpdate() (at C:/Projects/Playmaker_1.9.0/Projects/Playmaker.source.unity/Assets/PlayMaker/PlayMakerFixedUpdate.cs:19)

As far as I can see the player object has a rigidbody2d attached to it. The only FSM that has something related attached to it is the movement FSM. Just a simple velocity2d to act on the Get Axis action.

Does anybody know what I'm doing wrong?

Thanks in advance!


  • Administrator
  • Hero Member
  • *****
  • Posts: 7623
    • jinxtergames
Re: Cannot use 'velocity' on a static body - warning message
« Reply #1 on: April 26, 2019, 10:24:26 AM »
Maybe the Static on the object  that you are trying to move is checked.

Andreas Tabak

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Cannot use 'velocity' on a static body - warning message
« Reply #2 on: April 27, 2019, 01:55:26 AM »
Hi djaydino,

I didn't even know such an option existed in the first place.

It is unchecked though. But I restarted Unity and now the warning messages are gone somehow. Maybe Unity had a bad day.