Closed dreammonkey closed 3 years ago
Hello everyone,
I had a go at this and I think I did a decent job at writing a proper API for the RaycastVehicle class, but unfortunately the end result is all but perfect. That's why I'd like to ask you all for some input/feedback about this implementation. I know I must be making a silly mistake somewhere, but I'm currently not seeing it.
Note: I'm not a Typescript guru, so please let me know if you see things differently !
~~### The problem. Currently the Raycast Vehicle is behaving more like a DancingRaycastRobot 🤖 :/~~
The hooks seems to be working fine, in my previous version I had forgotten to provide the proper arguments for the useBox API, a silly error indeed ;) So could you guys please have a look and let me know what you think about this implementation, I'm very much open to suggestions/enhancements !
@codynova I was preparing my fork to create a pull request when I noticed I was somewhat behind on you guys... When merging my branch with the upstream master it seems that the examples are broken... Are you aware of this, or is or just me ?
Thank you a lot for your contribution with the Vehicle feature ! I was looking for the example but it seem's broken on my side too! (same log) Have you got an idea what's wrong on the Vehicle example and how to fix it ? I am sure that i will use this new hook , wainting for it since a long time... Thank you again!
Hello @Franckapik ,
Thank you a lot for your contribution with the Vehicle feature ! I was looking for the example but it seem's broken on my side too! (same log)
I believe the demos are broken because of an update to the react-three-fiber framework. I'm relatively new to the framework so fixing the demos is something I'd rather leave to the pros ;) Best thing to do I think is to create a separate issue about this (and hope that someone creates a fix...)
Have you got an idea what's wrong on the Vehicle example and how to fix it ?
The Vehicle example works, if you'd checkout my raycastvehicle branch you should be able to build the examples and see the vehicle demo working (if that's not the case, let me know). Mind that the raycastvehicle branch is currently not up to date with use-cannon at the moment.
I am sure that i will use this new hook , wainting for it since a long time...
Same here ;)
Thank you again!
You're welcome !
I succeed to see the vehicle example by using your branch! It's indeed a react three fiver update issue! I'm not familiar with the git collaboration and development but i understand that we have to find why there is merging issue with v5 ...
Thank you @dreammonkey !
Hello @dreammonkey and @codynova ! So I looked at the code of the use-cannon examples and indeed saw that the versions were a bit late according to the progress of react three fiber:
Now: "@react-three / cannon": "file: ../ dist", "react": "16.13.1", "react-dom": "16.13.1", "react-router-dom": "^ 5.2.0", "react-three-fiber": "^ 5.0.1", "three": "0.118.3"
@dreammonkey , you forked the project when it was at version 4.2. Switching to current v5 returns several errors, the main one being the "init error" apparently linked to changes in the reconciler which requires an upload of react and react-dom to v17.
So I brought the following elements on my fork -change of versions in the examples at:
-sRBG removed from canvas. -rename the import use-cannon to @ React-three / cannon -small correction of a bug on MondayMorning. -insertion of raycastVehicle which works well
However, I find a main error that appears randomly:
@codynova , without wanting to ask you to look at the code, have you ever seen this error which seems to come from the provider?
Otherwise, a second smaller consequence is an alteration of the functionality of the mouse in the following examples: -MondayMorning: the cursor is not follow enough the mouse. -PingPong: the mouse does not seem to exist.
The other examples work!
In the meantime, I'm going to go to the raycastVehicle you wrote and if we can fix those little bugs, I'd love to see raycastVehicle in the master !!
Thanks again !
Hey @Franckapik, you can see the code that seems to be causing the error here
This code was introduced in #100 to fix #99, but I don't personally have a VR headset, so wasn't much involved in that development
Thank you @codynova for this precision! I will try to revert this commit tonight to see if i see a new error or not. Like you, i don't have a VR headset so i won't be able to fix unless it is simply a change in useThree() regarding gl.xr which seems undefined since the last update.
@Franckapik have you made any progress on this? I was having a go at updating my fork to be in sync with master and came across exactly the same issues you described earlier. Would be silly to do the same work twice ...
@codynova is someone currently working on fixing the examples ?
I'd like to know if there are plans to implement cannon's RaycastVehicle in this library ? Maybe there is someone already working on it? I guess it would be an awesome feature ...
Great work BTW !