playMaker

Author Topic: "Perfect jump"  (Read 2190 times)

Norab

  • Playmaker Newbie
  • *
  • Posts: 5
"Perfect jump"
« on: December 15, 2015, 08:39:24 AM »
Hi,

I'm working on a 2D mini game and I want to make my player object do a "perfect jump". I mean that the jump is always on the same distance on X and Y axis in left or right direction (see the example picture below). I tried to do it with "add force 2D" but it seems impossible to do it with physics.



Any idea of how I can do this?

Sorry for my rotten english.

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: "Perfect jump"
« Reply #1 on: December 15, 2015, 03:56:43 PM »
I'd look into non-physics controlled controllers.

This is one that I've used in the past:

https://github.com/prime31/CharacterController2D

I translated his test input script to a playmaker action here:

http://hutonggames.com/playmakerforum/index.php?topic=11323.msg53395#msg53395

Good luck!

Norab

  • Playmaker Newbie
  • *
  • Posts: 5
Re: "Perfect jump"
« Reply #2 on: December 15, 2015, 07:14:55 PM »
@kellyRay, it could be a good solution if I have an idea of what you talking about :P
Thank you anyway for trying to help.

I think I found a solution : use one Itween Move To for each axis with an ease on Y axis.

Now the question is : If I use two Itween Move To for each move (so 4 actions in any), how much does it will affect the memory usage?
« Last Edit: December 15, 2015, 07:26:32 PM by Norab »

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: "Perfect jump"
« Reply #3 on: December 15, 2015, 08:45:04 PM »
I'm unfamiliar with iTween, so I'd be useless there.

The non-physics based controller is essentially like the character controller component unity provides. You download Prime 31s 2d character controller script. Tell it what tags to look for as a platform and then use my FSM action to control it.

Norab

  • Playmaker Newbie
  • *
  • Posts: 5
Re: "Perfect jump"
« Reply #4 on: December 16, 2015, 08:44:31 PM »
Thank you for your proposition, but finally I decided this would be the platforms that would move, so I no longer need controller on my player object.

However, I know that your script exists and there are chances that I use it in the future.

So, thank you again!