playMaker

Author Topic: Cant move and jump at the same time  (Read 1441 times)

CallMeEvelyn

  • Playmaker Newbie
  • *
  • Posts: 4
Cant move and jump at the same time
« on: May 16, 2023, 03:07:29 PM »
Heyy, Im really new to unity and playmaker as a whole so sorry if Im just doing a stupid mistake, but whatever way I use (get axes, add force 2d etc...) I can get my character in a 2D platformer to be able to move and jump at the same time, either i have to delete the function for move and they can jump, or delete the function for jump and they can move. Any ideas as to why this would be happening?
Thanks in advance
Evelyn

Christoph

  • Beta Group
  • Sr. Member
  • *
  • Posts: 256
Re: Cant move and jump at the same time
« Reply #1 on: May 16, 2023, 05:10:16 PM »
Do you separate the FSM? One for jumping, the other one for moving?

CallMeEvelyn

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Cant move and jump at the same time
« Reply #2 on: May 17, 2023, 04:48:26 AM »
Yes I do

CallMeEvelyn

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Cant move and jump at the same time
« Reply #3 on: May 17, 2023, 06:33:41 AM »
If it’s of any help the jump seems to work when the movement fsm is enabled and I tick the every frame box, but at that point movement doesn’t work even if it’s on.

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7618
    • jinxtergames
Re: Cant move and jump at the same time
« Reply #4 on: May 17, 2023, 08:20:15 AM »
Hi.
What action are you using for movement?

if for example you use velocity 2d only do movement for x direction

for jump you can add force impulse for example in the Y direction

CallMeEvelyn

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Cant move and jump at the same time
« Reply #5 on: May 17, 2023, 08:27:56 AM »
Ye that’s exactly what I tried but only one thing works at a time either the “space” for jump or “a,d” for movement don’t work, always just one of them. I even tried following some tutorials who did both movement and jump logic and it worked for them, but when I copy exactly what they do it just doesn’t work.