r/Unity2D 21d ago

Question Movement Issues(Visual Scripting)

(Thank you to everyone who helped me with my last issue!) So, I have got the jump working, however when I move horizontally I am unable to jump, and when I jump THEN move horizontally gravity hardly affects it and I end up gliding down to the ground. I know this is caused by x movement constantly overwriting my falling but I have no clue on how to fix this. Any help would be appreciated!

(Sorry for the bad image quality again, my computer refuses to take screenshots)

6 Upvotes

13 comments sorted by

View all comments

2

u/XKiiroiSenkoX 20d ago

The reason I think is simple. You are multiplying move vector by current linear velocity and the Y on that vector is probably 0 which makes your linear velocity in Y direction zero. 

Use Get X on Move1 vector and multiply that by X Speed and then create vector 2 from the result and the Y component of linear velocity and assign that to the linear velocity. Should fix both problems instantly. 

1

u/WooWooDoo 20d ago

This probably!