Why is my character shaking?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
MaxGamz
Party member
Posts: 100
Joined: Fri Oct 28, 2022 3:09 am

Why is my character shaking?

Post by MaxGamz »

Game.love
(861.36 KiB) Downloaded 40 times
I first though the issue might have been my camera but I realized that it was just with the rocket itself. I am using bump.lua; however, anytime I move the player (the rocket) it shakes. I have never experienced this before and I am honestly confused on how I should go about solving the problem. I checked the code and everything seems fine, I just want smooth movement with some motion blur rather than a choppy shaky movement animation.
User avatar
_JM_
Prole
Posts: 11
Joined: Thu Mar 30, 2023 9:06 pm
Contact:

Re: Why is my character shaking?

Post by _JM_ »

I resolve the shake problem changing your code from this:

Code: Select all

cam:update(dt)
cam:follow(Player.x, Player.y)
to this:

Code: Select all

cam:follow(Player.x, Player.y)
cam:update(dt)
the 'follow' function from STALKER-X need to be called before the 'update' apparently...
MaxGamz
Party member
Posts: 100
Joined: Fri Oct 28, 2022 3:09 am

Re: Why is my character shaking?

Post by MaxGamz »

_JM_ wrote: Wed Dec 27, 2023 2:37 pm I resolve the shake problem changing your code from this:

Code: Select all

cam:update(dt)
cam:follow(Player.x, Player.y)
to this:

Code: Select all

cam:follow(Player.x, Player.y)
cam:update(dt)
the 'follow' function from STALKER-X need to be called before the 'update' apparently...
Thanks for the advice! So it wasn't a problem with physics, I just needed the camera to follow the layers position right?
Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 60 guests