Closed Liquid-Blocks closed 2 years ago
Hi @Liquid-Blocks, I'm quite struggle with calculating location or rotation. Could you please to advise if we have any tool to locate the coordinator? It would be so helpful. Regards,
btw, all directions I implemented so far is fine, except backward move. Sometimes it loads with different face directions.
Hi @Liquid-Blocks ,
I have resolved the issue below, it's ok now.
Just one more concerns, if our Player stops moving, should it keep its face direction?
Hi @codeeMadness, this is very good work for achieving the goal of setting the facing rotation!
I have experimented with it a bit and think it is a good suggestion to keep the facing direction when Player stops moving.
There is only one thing, the implementation introduces a new check of the users input.
As shown in the image below, the input catching logic is duplicated between the PlayerLocal.update
and AvatarController.rotateFaceDirection
.
Ideally, to optimize the update loop, we would:
PlayerLocal
.PlayerLocal.update
THREE.Object3D.quaternion
from its parent. AvatarController
as an argument of AvatarController.update
AvatarController
would only copy the capsules facing rotations using AvatarController.applyQuaternion
, inherited from its THREE.Object3D
parent.Now we have 2 options,
I tend to prefer the second option since it keeps a better track of what is going on, so i will merge these changes into develop and open a new issue for the rest
This issues will be continued in an other optimization related issue
edit: Follow up in issue #59
When the view is in 3rd person, the character does not always face the direction he his walking.
https://user-images.githubusercontent.com/46661277/167970550-2f9aba8d-26ea-4321-9c4e-019a4ebdf7ea.mp4