Hi.
I’m using the platformer template to play around a bit with raycasting. I replaced the sprite and collider of player with simple rectangle, and added one raycaster.
When moving with the player, it seems like the raycast lines are lagging behind the player.
(yellow lines are player’s (grey rectangle) movement. You can see that the raycast red lines are drawn according to the position that the player was like a frame (or couple of frames) before)
And one weird thing, when moving against the wall, the rays stops at the point where player would be, if there was no wall.
(on the left I’m moving against the wall, on the right I’m standing still)
I suppose this has something to do with the messaging system and the order of calculations?
Would there be a way to fix these issues?