Closed Pear104 closed 2 months ago
You don't need the <Ecctrl ref={charRef}>
And this is the position of the character: charRef.current.translation()
You don't need the tag. Assign the chraRef to Ecctrl:
<Ecctrl ref={charRef}>
And this is the position of the character:charRef.current.translation()
Thank you for your guidance! Your suggestion worked perfectly. I really appreciate your help
Hi,
I'm a newbie.
I'm currently learning by doing some game experiment with react-three-fiber.
I want to get the current position of the character which is being controlled by the ecctrl, how can i get it
I tried a simple way by wrapping it inside a component and test it by logging the position but it still always the same position, although the character is moved:
Am I doing something wrong? If so, is there any way to get the current position of the model? Thank you very much for your assistance and guidance.