playMaker

Author Topic: Proper 2d Jumping Physics  (Read 1589 times)

HeathClose

  • Full Member
  • ***
  • Posts: 226
    • View Profile
Proper 2d Jumping Physics
« on: March 21, 2017, 02:24:49 PM »
So I've set up a 2d character to jump using an impulse force... played with making the gravity a little heavier on their 2d rigidbody and the impulese force a little more intense... and it looks ok... but it doesn't have acceleration on the fall...  it looks a little floaty... linear... both up and down... unnatural... it doesn't ease in any way... and it just looks weird to me... 

anyone have any suggestions on a more realistic or more "game like" jump... maybe using acceleration somehow or something...

what do you folks do to make jumping look good?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13889
  • Official Playmaker Support
    • View Profile
Re: Proper 2d Jumping Physics
« Reply #1 on: March 21, 2017, 10:37:03 PM »
Hi,

 Have you checked the 2d platformer complete remake with PlayMaker? https://github.com/jeanfabre/PlayMaker--UnityLearn--2dPlatformer

If this jump is more suitable, check out how it's all setup.

Bye,

 Jean

HeathClose

  • Full Member
  • ***
  • Posts: 226
    • View Profile
Re: Proper 2d Jumping Physics
« Reply #2 on: March 22, 2017, 07:36:46 AM »
Hi,

 Have you checked the 2d platformer complete remake with PlayMaker? https://github.com/jeanfabre/PlayMaker--UnityLearn--2dPlatformer

If this jump is more suitable, check out how it's all setup.

Bye,

 Jean

Thanks Jean but I can't get that to work or even install playmaker...

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13889
  • Official Playmaker Support
    • View Profile
Re: Proper 2d Jumping Physics
« Reply #3 on: March 22, 2017, 11:14:02 PM »
Hi,

 what's happening?

 Bye,

 Jean

HeathClose

  • Full Member
  • ***
  • Posts: 226
    • View Profile
Re: Proper 2d Jumping Physics
« Reply #4 on: March 23, 2017, 11:11:38 AM »
Hi,

 what's happening?

 Bye,

 Jean

i got it working by downloading the test package and importing it into a new project with playmaker...

I did learn about line cast looking into this...

is a line cast like a one shot compared to a raycast that is persistent?

also, I don't see a difference in the rigid body settings or any difference in physics...

Does anyone else have any physics suggestions for better platformer jumping? maybe using acceleration or something?

« Last Edit: March 23, 2017, 11:34:32 AM by HeathClose »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13889
  • Official Playmaker Support
    • View Profile
Re: Proper 2d Jumping Physics
« Reply #5 on: March 23, 2017, 11:17:49 PM »
Hi,

 LineCast is a different kind of raycasting on how you set it up, but in terms of recurence, it's subject the option you pick inside the action.

do you mean the jumping is not suitable there too? that's fine if it isn't, I am trying to understant what you are after.

 if you want it to fall faster on its way down, then  use you'll need to mess with giving it a kick with add force when you detect it's going down ( check the height and when the new height is lower than the last height, it's going down)

 Bye,

 Jean

HeathClose

  • Full Member
  • ***
  • Posts: 226
    • View Profile
Re: Proper 2d Jumping Physics
« Reply #6 on: March 29, 2017, 05:58:38 AM »
Although he talks over my head most of it... I did get some ideas from this...

https://youtu.be/hG9SzQxaCm8

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 13889
  • Official Playmaker Support
    • View Profile
Re: Proper 2d Jumping Physics
« Reply #7 on: March 29, 2017, 06:14:51 AM »
Hi,

 Thanks for sharing :)

 Bye,

 Jean