-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tunneling problem with CCD enabled bodies #286
Comments
Have you tried using the built-in Rapier debugger yet? I created a Three.js helper class that adds your Simply run the |
Thank you for your answer. That's a really good point but actually, in my project, Rapier is server-side and my graphics engine (Three.js) is client-side. Rapier updates position and send them to clients. With my infrastructure, I don't think it'll be possible to send complete geometries to clients, or I'll need to implement the debugger server-side and client-side which seems a bit redundant... And because I tested cuboid geometries instead of custom geometries for my bodies/colliders, a part of me think it might not help me as it should. But I will try it anyway, as I tend to reproduce this bug in a smaller environment than my video-game prototype (like with no server at all, only client-side, with simpler shapes, etc....) (sorry I closed the issue by missclick 😅, it's my first issue published in Github so I'll need a bit of time to see how it works) |
It seems rapier is easier to tunneling, compare to others physics engine. |
Oh it's interesting ! Very nice tool to compare Js physics engines. thanks ! So yeah, Rapier seems easier to tunneling if substep is equal to 1, but if we set it to like 5 it seems more relevant. Do you know if, in your example, the Because in my project, I can't figure out how to modify |
Hello ! I'm encoutering a problem with my objects/bodies. I'm working on JS 3D video-game which takes place in space (so no gravity) but it isn't a space simulation. More like an arcade video game.
So, the player controls a space ship (third person view) and can fire lasers (they are small boxes geometry which are going pretty fast), I enabled CCD on both bodies (spaceship and each laser body/collider). But when a player fires lasers on another player's spaceship at a certain angle, we can experiment tunneling.
video_illustrating_tunneling.mp4
I thought at first time it was because the lasers are moving really fast (like X-wings lasers in star wars movies) or because the spaceship collider geometry isn't clean, so maybe some faces of the model are glitching (it was a TriMesh).
So I tried several things:
setCanSleep(false)
because it can happen when a spaceship isn't moving, so I thought maybe it was because of Sleeping modeIntegrationParameters.maxCcdSubsteps
to increase it but didn't work I think ? Or at least I didn't notice changes in my problemBut nothing significant or relevant to fix the tunneling problem with all this.
Few things to note :
KinematicVelocityBased
with CCD enabled;I don't really know what to do now. I will try to update this issue with a simplified version of my project I can share with you, if you're interested to help me. But if you already have some clues, especially with the
IntegrationParameters.maxCcdSubsteps
parameter which doesn't seem to change collision accuracy, feel free to share your thoughts :)The text was updated successfully, but these errors were encountered: