-
Notifications
You must be signed in to change notification settings - Fork 15
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
Able To Physgun Objects Through Anything Immobile #25
Comments
Caused because bullet has no CCD solving. |
Okay I understand now, I have done C++ programming in the past using a small amount of Bullet in conjunction with the Irrlicht 3D engine as well as MikeNet networking api to make some small games, collision detection was always a big headache, if I may suggest a possible method to tackle this, unless of course you already have an idea as to how you'll go about it, if the object is moving you might be apt to do a ray cast in the direction the object is moving and get the collision point from that to accomplish the CCD test? It is most likely much more complicated that I am aware of. |
Bullet has some faux CCD in btDiscreteDynamicsWorld.cpp, but I have it disabled because it's really slow on large maps. |
So, turns out I was completely wrong! Awesome! This has absolutely nothing do with ccd (except for if the object goes through the ground fast enough, no contact points will be generated). The constraint solver will "push" interpenetrating objects out of eachother, but it does not alter the velocity of the objects. And apparently there's a load of left over delta impulse after every iteration, even more since the shadow controller is forcing the object into an invalid state. So then the next step in the tick is to integrate the transforms, which means moving the objects to their new positions based on their velocity and the timestep. It may be better to just detect contact points in the shadow controller and slide along them rather than forcing the object through them. |
Update: This appears to be caused by the physgun giving the object a huge mass. The impulse on a object by a contact point is scaled by the object's inverse mass, so the delta velocity is really small. The impulse is scaled up by the inverse diagonal jacobian between A and B in setupContactConstraint, but that doesn't scale up the impulse nearly enough. Need to look into this. Okay, the inverse diag jacobian is too small cause of the angular component being factored in. If the angular component is 0, there is absolutely no passthrough, but the objects won't be rotated by the contact points. |
(Sort of) fixed in 67d8dc4. It's not impossible but it's harder to do. |
You are able to take any object that can be picked up with the physgun and move it through another object that is currently frozen as well as the world geometry itself, the object is constantly being 'pushed' out of the other object instead of blocking the held object from entering the other, this leads to the inability to effectively build in a variety of ways.
The text was updated successfully, but these errors were encountered: