playMaker

Author Topic: Add Force 2D (Jumping) not responding.[SOLVED]  (Read 6582 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Add Force 2D (Jumping) not responding.[SOLVED]
« Reply #15 on: May 28, 2017, 03:59:13 PM »
I did a test. With Add Force - Force, I used 500. It was enough in my case. Then I set it to Impulse. To get the same jump height, I had to use 10. The same with Set Velocity, But 10000? It will jump to Mars, or maybe out of the Galaxy. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Add Force 2D (Jumping) not respoding.
« Reply #16 on: May 28, 2017, 04:56:04 PM »
@Rabagast

Nice suggestion, thanks! It seems to take more normal values than the add force 2D. Tried lowering the values, but it still needed values over the 10000 to achieve liftoff :P


What number do you have in the Mass field in the Rigidbody? Because Mass affect the Add Force - Force, but not impulse. I tried to set the Mass to 100, then I had to use 50000 to the Add Force to get the same jump height.
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

Redxlotus

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Add Force 2D (Jumping) not responding.[SOLVED]
« Reply #17 on: June 01, 2017, 01:00:45 PM »
These are the settings that are used :o pressed reset just in case, but it stayed the same. See anything off?

and with set velocity it works normally I use 10 to make my character jump so that's all fine and dandy.

EDDIT:

Before I upgraded unity to 5.6.1 add force2D with impulse yielded the same result (10k+ to get my character to jump a bit)

Now in version 5.6.1 addForce2D works fine, with a value of 10. So I have no idea what changed. Might be a bug :o I really don't know.
« Last Edit: June 01, 2017, 01:07:31 PM by Redxlotus »

MaxD

  • Playmaker Newbie
  • *
  • Posts: 1
Re: Add Force 2D (Jumping) not responding.[SOLVED]
« Reply #18 on: June 14, 2023, 09:00:58 PM »
Hi everyone,
So long after this thread was created, I've been though the same problem and found the explanation.
Same as above, I set a jump FSM with the Set Velocity 2D action and, what prevented the player to jump in my scene was that, by default, the Vector x,y (of the Set Velocity 2D) was set to 0,0 and remained that way even when I entered a Velocity value. So be sure to 'deactivate' the vector (switch it to none) if you encounter the same problem and everything else is as it should be, this should solve the issue !