Open WilldelaVega777 opened 3 years ago
Did you find the solution? I have same issue and i can't find the solution about this.
Anyone find a solution for this?
for me the camera works fine, but I keyboard input doesn't work. Going to keep digging and see if I can fix it and will submit a PR if this happens
For me the camera and keyboard controls for player movement didn't work. In Player.js, if you swap camera.position.copy(ref.current.position);
for ref.current.getWorldPosition(camera.position)
, the player controls start working again.
@ldhandley thanks so much for that, that worked perfectly for me. spent hours checking and rechecking scripts, learned a valuable lesson today, check the repo issues before spending too much time debugging stuff if all looks correct!
The app doesn't work anymore with the latest versions of the library, some things don't apply anymore like the setDefaultCamera() function not being anymore part of useThree().
It would be awesome to see an updated version of this video and having a chance to learn how to make this app work with the latest versions of the libraries.
I tried by adding:
in Camera.js instead of using setDefaultCamera() at no avail. Right now the sphere falls into the floor where the camera object is. It is possible to use the mouse pointer to see around but the keyboard doesn't respond other than to jumps and then I can see a ball around the camera jumping forever on top of it.
It would be awesome to have this example working as I have not found a better video/example of react three fiber with useCannon in the whole web.