Closed Liquid-Blocks closed 2 years ago
Hi @Liquid-Blocks,
I still don't know how to use "applyQuaternion" as your suggestion. Did try, but the model still not rotate. Please help to take a look on my branch, and give any further advise. It would be much appreciate.
@codeeMadness No problem, I will open the branch and take a look, thank you
Hi @codeeMadness , I have solved the payer rotation in a new branch that I merged into develop in PR #70,
The final solution uses the horizontal velocity to find the facing rotation.
This issue is a following of the issue #49 Character face walking direction
The closing message on issues 49:
As shown in the image below, the input catching logic is duplicated between the
PlayerLocal.update
andAvatarController.rotateFaceDirection
.Ideally, to optimize the update loop, we would:
PlayerLocal
.PlayerLocal.update
THREE.Object3D.quaternion
from its parent.AvatarController
as an argument ofAvatarController.update
Then the
AvatarController
would only copy the capsules facing rotations usingAvatarController.applyQuaternion
, inherited from itsTHREE.Object3D
parent.