gv-sh / methlab-3js

0 stars 0 forks source link

Local axes/normals of the character model should be updated upon the turning #18

Closed gv-sh closed 1 year ago

gv-sh commented 1 year ago

The newer animation states (ref. #10) has the below problem.

On calling turning left, right or back states, the local axes of the model should be updated.

Steps to reproduce the problem:

  1. The character's (angle of) heading set to 0 in the beginning.
  2. The model is turned left for first time, and if the angle by which heading of the character changes by, is PI/3.
  3. The model is again turned left by PI/3.

Expected output: The model's effective heading should now by 2PI/3. Current output: Since the model's local axes are not updated in the animation, the animation again begins by assuming the model's heading is 0, the final heading remains as PI/3.

Note: Please also let me know the desired angle of single turns (left/right) and turning back. For turning back, I'm assuming PI which is turning diametrically opposite. I'm assuming PI/3 above for the sake of explanation.

This is easier to solve in animation file then finding a hack through the code.

Please check at your end. Let me know if you need alternate explanation.

gv-sh commented 1 year ago

This limits the smooth implementation of #5. For now, I have managed to hack a way to implement 4-direction movement (excluding diagonal movements).