playMaker

Author Topic: 2D Plaform Movement cant Jump  (Read 497 times)

RichardsonS83

  • Playmaker Newbie
  • *
  • Posts: 2
2D Plaform Movement cant Jump
« on: October 25, 2023, 09:12:41 AM »
Hi all,

new to programming was hoping Playmaker would help me but stuck already lol

Could do with some help I have watched youtube videos and followed to a T and cannot get 2d player to jump unless move is turned off. I dont know if its Unity or Playmaker or More than Likely me.

the tuts I followed
I have set Rigidbody2D and Box Collider 2D also tried Capsule Collider 2D incase it a collider issue.

I have tried Rigidbody2D Dynamic, Kinematic, Static. I have tried messing with mass, Lin/Ang Drag and Gravity Scale.

For Movement I have used Translate2D, Set Velocity2D.
For the Jump I have Add Force 2D (Force and Impulse), Set Velocity 2D

Yet Jump with Get Key Down (Space) Add Force 2D / Set Velocity will not work force does work at a very high number however I dont like this as it seems to teleport to location before very slowly moving back down plus I also have to mess with Gravity Scale in the Rigidbody 2D.

Another thing is my player starts above the ground and moves terribly slowly towards it. If I stop the Movement FSM the player falls perfectly so its like translate 2D and Set Velocity 2D are conflicting with the Rigidbody 2D. like I said I have followed multiple tutorials on this and they all pretty much advise the same method, quite upsetting that I'm failling at my very first hurdle especially when watching video tutorials. Unity version currently is  2022.3.10f1 if it helps

Any help would be appreciated I have added some screenshots but as advised I have been trying different combos trying to get this to work


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: 2D Plaform Movement cant Jump
« Reply #1 on: October 27, 2023, 07:56:03 AM »
Hi.
Change the force mode :)

RichardsonS83

  • Playmaker Newbie
  • *
  • Posts: 2
Re: 2D Plaform Movement cant Jump
« Reply #2 on: October 30, 2023, 06:36:24 AM »
Hi.
Change the force mode :)

Thanks but I have tried both Force and Impulse. Force works however I dont like how it seems to teleport the player before falling back down. Also it has to be set to a stupidily high number

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: 2D Plaform Movement cant Jump
« Reply #3 on: October 30, 2023, 09:28:32 AM »
Force is like pushing something, impulse is like kicking something.
on the video @2:22 you can see that it is set to impulse.

try on a new scene, place a box and use only the force action with the space bar (for example) to trigger it.

one common issue is that it gets override by other control actions like translate vertical, veloclty, move and other actions.