Give option to dont rotate CollisionShape on specific axis #10920
azur-wolve
started this conversation in
Engine Core
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Not sure if this applies for 2D.
But on 3D, when is about character controllers is a good practice to don't rotate the
CollisionShape3D
on the vertical axis to avoid things like inaccuracy on edges. So when move camera laterally doesn't occur physics jitter.CharacterBody3D.axis_lock_angular_y
accounts for that.But now have a problem, when want to know the movement direction of the body, it is different depending on which global direction its looking.
So when need to know the move_dir for implement whatever feature, that's a problem.
Some workarounds can be done, but those over-complicate it all for such a simple thing.
A solution is to simply rotate the
CharacterBody3D
and set every frame the rotation of theCollisionShape
to zero.This works but what if must do it for every single actor (either player or NPC) every frame?
(have not monitored yet the performance impact so its a doubt right now)
Having a way to lock specific rotation axis of the
CollisionShape3D
would solve any of that.Let it just simply don't rotate on a specific axis as its parent does, internally.
Beta Was this translation helpful? Give feedback.
All reactions