When my player moves in the left direction it flips on the horizontal axis because i only have an animtaion that allows the player run right. But the problem is that the collision box stays in the same position. I was wondering how i could change the coordinates of the collision group as i have tried using the command:
i messed around with it and made some new code:
I found these 2 lines in my program which are used to set the players direction:
if speed_diff < 0 then --lines 62 and 64 set the acceleration to work in the direction of the difference
acceleration.x = -move_acceleration
else
acceleration.x = move_acceleration
end
so i added the lines:
if speed_diff < 0 then --lines 62 and 64 set the acceleration to work in the direction of the difference
acceleration.x = -move_acceleration
self.direction = -1
else
acceleration.x = move_acceleration
self.direction = 1
end
at the end of the update function i wrote:
if self.direction == -1 then
sprite.set_hflip("player#collisiobobject",true)
end
But this also didn’t do anything for some reason.
(I did find the error in the URL of the collision, atleast thats where i thought it was lmao
)