My player spawns on a conveyor belt, right in the middle of the bottom part of a “river” that functions like a conveyor belt
These red parts of the river node are area2d collision shapes, and when the player collision enters any of those red lines, it will set a variable such as “in_river_bottem_side” to true, and set it to false when the player exits it
#
#A part of the players script for moving along the river
#
func _process(delta):
if in_river_bottem_side:
move_local_x(-river_flow * delta)
if in_river_left_side:
move_local_y(-river_flow * delta)
if in_river_top_side:
move_local_x(river_flow * delta)
if in_river_right_side:
move_local_y(river_flow * delta)
I applied delta to the code earlier but the player still sometimes gets stuck in the bottem left corner, and sometimes it moves like it’s fine.
It can also make a few laps around the river, and then get stuck again.
how do I fix this?
Right now the only way I can think of solving this is adding walls around the conveyor belt and extending the collisions of the conveyor belt.
btw: (like almost everybody else asking questions, I’m a newbie and I will probably not reply fast at all(school) )
btw 2 the sequel: (I can provide a video to showcase the problem in greater detail if you want me to)