Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Lostcity on November 04, 2014, 11:45:07 PM

Title: Weird issue with Set Property and Jump
Post by: Lostcity on November 04, 2014, 11: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.


Title: Re: Weird issue with Set Property and Jump
Post by: robmyers67 on November 05, 2014, 06: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
Title: Re: Weird issue with Set Property and Jump
Post by: Lostcity on November 05, 2014, 07: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.
Title: Re: Weird issue with Set Property and Jump
Post by: robmyers67 on November 05, 2014, 07:10:40 PM
Sorry mis read slightly,
Have you tried changing the force scale as the gravity may be keeping the character down?
Title: Re: Weird issue with Set Property and Jump
Post by: Lostcity on November 05, 2014, 09: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.