minecraft-react icon indicating copy to clipboard operation
minecraft-react copied to clipboard

Are there any plans to update this project to the latest version of @react-three/fiber?

Open WilldelaVega777 opened this issue 2 years ago • 5 comments

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:

useEffect(() => {
    set({camera: cameraRef.current})
})

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.

WilldelaVega777 avatar Aug 03 '21 23:08 WilldelaVega777

Did you find the solution? I have same issue and i can't find the solution about this.

metinozkan avatar Oct 01 '21 07:10 metinozkan

Anyone find a solution for this?

marcel-labela avatar Nov 26 '21 13:11 marcel-labela

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

tommymaher15 avatar Dec 13 '21 23:12 tommymaher15

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 avatar Feb 07 '22 19:02 ldhandley

@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!

tmartinez88 avatar Jan 15 '23 01:01 tmartinez88