playMaker

Author Topic: Weird issue with Set Property and Jump  (Read 1465 times)

Lostcity

  • Playmaker Newbie
  • *
  • Posts: 31
    • View Profile
Weird issue with Set Property and Jump
« on: November 04, 2014, 09:45:07 PM »
I have had issues getting my character controller to jump with an FSM over the past few weeks. Today, just out of curiosity, I created a new scene, copied my character and created a new jump FSM. To my surprise, the Set Property-InputJump worked and the FSM was correctly making my character jump.

edit: After digging further the Set Property is working correctly and seems to be setting the Input Jump bool value like it should. However, my character will not leave the ground. If I use the Space bar, my character will jump as it should but if I use an FSM to trigger the jump, it won't work correctly (jump animation plays but the character stays on the ground).

Please help.


« Last Edit: November 04, 2014, 10:42:12 PM by Lostcity »

robmyers67

  • Playmaker Newbie
  • *
  • Posts: 14
    • View Profile
Re: Weird issue with Set Property and Jump
« Reply #1 on: November 05, 2014, 04:57:09 PM »
Have you tried setting a force to the object when you press Jump. This will still play the animation but will force the character up in the air.
Make sure h has a rigid body so gravity takes effect and he comes back down.

Cheers

Rob

Lostcity

  • Playmaker Newbie
  • *
  • Posts: 31
    • View Profile
Re: Weird issue with Set Property and Jump
« Reply #2 on: November 05, 2014, 05:03:05 PM »
Have you tried setting a force to the object when you press Jump. This will still play the animation but will force the character up in the air.
Make sure h has a rigid body so gravity takes effect and he comes back down.

Cheers

Rob

My character is using a character controller. Using rigid body physics would make things much easier but I was under the impression that you should never have a character controller and a rigid body attached to the same object.

Is that not true? My game will be made for mobile platforms so performance is a big factor.

robmyers67

  • Playmaker Newbie
  • *
  • Posts: 14
    • View Profile
Re: Weird issue with Set Property and Jump
« Reply #3 on: November 05, 2014, 05:10:40 PM »
Sorry mis read slightly,
Have you tried changing the force scale as the gravity may be keeping the character down?

Lostcity

  • Playmaker Newbie
  • *
  • Posts: 31
    • View Profile
Re: Weird issue with Set Property and Jump
« Reply #4 on: November 05, 2014, 07:01:13 PM »
Sorry mis read slightly,
Have you tried changing the force scale as the gravity may be keeping the character down?

I'll have to check it out as soon as I can get to my computer. It's just very odd that the jump FSM works almost perfectly in my scene that just has my character, GUI, and a cube (serving as a floor), but when I copy everything to one of my finished levels, the character will no longer leave the ground.