I have a weird problem that I hope you can help me with. #48
Replies: 1 comment
-
With a time step duration of 1/30, and a gravity of -1000, the capsule can accumulate huge amounts of linear and angular velocity every frame. Even if the solver can stop penetration in one frame, it's likely that the next frame will be so different that a whole new bunch of penetration has occurred. Spheres are rotationally invariant. Against a flat plane, the contact will be right under the center of mass. That's pretty easy to deal with in comparison to capsules: the contacts detected with a capsule are sensitive to orientation, and that orientation is being flung all over the place by the high angular velocity and long time step duration. In other words, the speed is too high for the time step duration; make things slower by decreasing gravity or decrease the time step duration. |
Beta Was this translation helpful? Give feedback.
-
Hello, may I ask you a question? Previously, I set TimeStepDuration of a new physical space as 1/30m and its gravity as -9.81m. Then, I created a ball in it, the mass of which was 100m and the gravity of which was -200m. The result was the ball would pass through the ground. Could you please tell me the reason for it? Or, how should I adjust the parameters to stop the ball from passing through the ground while not changing the ball’s mass and gravity?
The code is as follows:
After reading your answer, I have added the following parameters and there will indeed be no problems.
https://github.com/bepu/bepuphysics1/discussions/46
But,Changing the Sphere to a Capsule will cause it to penetrate the ground.Sphere don't seem to have this problem
http://www.aiqimen.com/WeChat_20230626160317.mp4
The code is as follows:
Beta Was this translation helpful? Give feedback.
All reactions