How do i make a block slide into place

Godot Version

Godot 4.2.2

Question

Programming Physics
I wanted to make a puzzle game where you have to launch boxes in specific places to activate things, and my problem is that very often, the box will fall with a strange rotation, causing it to get stuck.

What I was thinking is a script that makes the box slowly slide into place, allowing it to enter holes even when initially it is tilted.
I have no idea in where to start to fix this, also the “lock rotation” thing is not an option, I need the boxes to be able to rotate.

Any help is appreciated, thanks in advance

what if you tried lerping to the closest increment of 90° once the movement / rotation is below some threshold?

1 Like

Worked for me, thanks!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.