playMaker

Author Topic: Jump at a set distance  (Read 8547 times)

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Jump at a set distance
« Reply #15 on: March 19, 2014, 04:21:15 AM »
Hi

Thanks, ive used the 'translate' action

I think ive done this part of the code wrong now lol

Code: [Select]
if (forward <= maxForward)
forward+=speedForward;
if (up <= maxUp)
up +=speedUp;

Do i use a 'FloatAdd' for the speed? or just use 'FloatCompare'?

or have i got the wrong idea?

thanks again

Nick

xhidnoda

  • Full Member
  • ***
  • Posts: 231
Re: Jump at a set distance
« Reply #16 on: March 19, 2014, 08:08:38 AM »
both action.
for this: if (forward <= maxForward)
use: FloatCompare
for this: forward+=speedForward;
use: FloatAdd
As for the rest.



coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Jump at a set distance
« Reply #17 on: March 19, 2014, 01:22:41 PM »
Thanks! I'll give that a test

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Jump at a set distance
« Reply #18 on: March 21, 2014, 10:39:04 AM »
Hi,

Ive had a go and i think i must be doing something wrong? The player jumps to the location but when falling it doesn't move smoothly?

attached my setup.

thanks again

Nick

xhidnoda

  • Full Member
  • ***
  • Posts: 231
Re: Jump at a set distance
« Reply #19 on: March 21, 2014, 04:48:17 PM »
Hi
I don't understand what is the problem here.
Your player jumps in the location rigth?
But when is falling  doesn't move? this is the problem?

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Jump at a set distance
« Reply #20 on: March 21, 2014, 08:55:48 PM »
hi,

The player jumps and lands in the location.

The problem is when the player is falling down (dropping) The player moves (shakes/wobbles) when falling.

something must be setup wrong with my FSM?

attached a video of how it behaves.
https://www.dropbox.com/s/v77fiqz2hnka61k/2.avi

Thanks

Nick

xhidnoda

  • Full Member
  • ***
  • Posts: 231
Re: Jump at a set distance
« Reply #21 on: March 24, 2014, 09:51:02 AM »
don't not really why happen this.  :o
Sorry can't help you on this.



coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Jump at a set distance
« Reply #22 on: March 27, 2014, 11:11:58 AM »
Hi xhidnoda,

I had a bit of luck and i fixed the issue with the shake/wobble. I noticed that the original script used a Vector3 and applied my own in playmaker. Now it works :)

Demo:
https://www.dropbox.com/s/l9qfwgpru9nt1tf/bounce003.avi


but now i have an issue where my player doesnt bounce to my exact location i specified in the 'forward' float.

e.g. i setup the 'forward' (Z axis) to be (2.00) but my player jumps to e.g. (2.10003) instead

Any ideas?

Could i somehow Clamp it at 2.00? Maybe a FloatClamp or Vector3Clamp? not sure as ive never done this before.

OR is there a calculation i could do to work out the end position of the jump? maybe by using the floats i have already...

My Floats are:
- forward
- SpeedForward
- MaxForward

- Up
- SpeedUp
- MaxUp

Thanks, hope im making sense.

Nick

« Last Edit: March 27, 2014, 11:30:28 AM by coxy17 »

xhidnoda

  • Full Member
  • ***
  • Posts: 231
Re: Jump at a set distance
« Reply #23 on: March 28, 2014, 11:46:33 PM »
Hi
Yes use Float Clamp to specific how far go your player when jump (z axis)

coxy17

  • Beta Group
  • Sr. Member
  • *
  • Posts: 355
Re: Jump at a set distance
« Reply #24 on: April 10, 2014, 05:34:10 PM »
Hi

That's works. But sometimes the player stops at 1.9999 instead of 2.00. Other times its over e.g.2.1

My setup is minimum=2.   maximum=2

Could this be the player sliding?

Thanks again

Nick