CharacterBody2D Sliding out of StaticBody2D instead of teleporting out of it in GODOT 4.1

52 Views Asked by At

I am trying to replicate Mario Maker's On/Off switches and if the player got stuck inside the block after it was toggled on, the player just teleported out it. I know this is expected, but I wanted a smoother transition. After looking it up, I found a video replicating the same feature in Godot, but the player, when stuck inside the block, slid out it, much more smoothly. How can I go about doing that?

This is the video I'm referencing above - on the second 33:

I tried disabling collisions when inside the block, but the Engine disabled it after abruptly moving outside the it; Tried manipulating only the sprite with a Tween, but like the collision, it happened after getting out of the block.

0

There are 0 best solutions below