Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: nicknick on January 11, 2017, 09:11:01 AM

Title: Newbie question: How to make a jumppad [SOLVED]
Post by: nicknick on January 11, 2017, 09:11:01 AM
Hi there,

can you give me some hints about how to make a simpe jump pad for the standard fps controller (no rigid body)?
Title: Re: Newbie question: How to make a jumppad
Post by: Fat Pug Studio on January 11, 2017, 09:17:35 AM
What's a jump pad, a place you step on and then it launches you in the air?

If it is, make a jump pad and place IsTrigger box collider above it which triggers set velocity on player when you collide it.

That includes using rigidbody, why are you avoiding using it?
Title: Re: Newbie question: How to make a jumppad
Post by: nicknick on January 11, 2017, 09:33:01 AM
Thank´s for the quick reply!

Yes, this would be a jump pad.
I want to avoid using the rigid body controller, because I like the other one much better, the controls of it feel much more responsive.

So, in order to get the controller moved other than by the player itself, I have to get some information from the controller. It would be a vector.3 variable, right? But how can I get it from inside playmaker?
Title: Re: Newbie question: How to make a jumppad
Post by: Fat Pug Studio on January 11, 2017, 09:38:04 AM
Get Vector3 XYZ under Vector3 actions. Store the desired vector in variable (i suppose you want to store Y). Then Set Vector3 XYZ, leave X and Z set to 'none', and set the desired value for Y.
Title: Re: Newbie question: How to make a jumppad
Post by: nicknick on January 11, 2017, 09:44:46 AM
Yeah, but it doesn´t get the Vector3 from the character controller?
Title: Re: Newbie question: How to make a jumppad
Post by: Fat Pug Studio on January 11, 2017, 09:54:13 AM
Do you have a screenshot of the controller to see how you're actually moving :)
Title: Re: Newbie question: How to make a jumppad
Post by: nicknick on January 11, 2017, 10:06:50 AM
For sure!
It´s just the FPS controller prefab from the standard Unity assets.

(https://s30.postimg.org/fs6hrk99t/controller.png)
Title: Re: Newbie question: How to make a jumppad
Post by: Fat Pug Studio on January 12, 2017, 02:17:12 AM
Oh, i haven't used character controller. Do you jump using Jump Speed?

In code the jump should be something like:

when you press the jump button > moveDirection.y = jumpSpeed;
Title: Re: Newbie question: How to make a jumppad
Post by: nicknick on January 12, 2017, 06:01:02 AM
Hey thanks, I finally figured it out  :D

In the script I had to set the needed variables to public, so my Playmaker fsm could change them with the "Set Property" action.
Take a look here:

(https://s28.postimg.org/ve91qddxp/pad.png)
Title: Re: Newbie question: How to make a jumppad [SOLVED]
Post by: Fat Pug Studio on January 12, 2017, 06:35:39 AM
Great ^_^