Replies: 1 comment 1 reply
-
|
You're mixing two different positions; as the documentation for
Don't use You're starting the sweep from inside the body you're moving, you're very likely occasionally hitting your own collision there, use a collision mask, or do a penetrating one with your own body filtered out. Also not sure that max distance is correct there, should be just the delta time if I remember right, unless you normalize velocity.
If you're not entirely familiar with the internals of bepu and our physics layer, you're better off using |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I want to fully control the movement of my object, so I am using a Kinematic Body and only relying on physics queries. The object's position is updated manually by my code.
In the code below,
Bodyis a Kinematic Body, and the other objects in the scene are Static Components.Problem
When using the
SweepCastAPI, I encountered the following behavior:speedis set to 5, the sweep sometimes fails to detect other objects and the body passes directly through them.speedis set to 10, the sweep always detects the collision, but the body stops with a noticeable gap from the other object.speed, the gap between the body and the obstacle when it stops becomes larger.result.Distance, the body will pass directly through the other object.Expected Behavior
What I want to achieve is the following:
Question
I am not sure whether my understanding or usage of
SweepCastis incorrect.Could someone explain the correct way to use
SweepCastformanual kinematic movement?Code
Beta Was this translation helpful? Give feedback.
All reactions