I'm using convextSweepTest to simulate my character capsule (imaginary, no real rigid body involved) sliding along a wall.
As in the picture below, in one frame, I sweep from A to B, I get no hit all all. So I assume B is safe and my character could move to B.
But in next frame, if I sweep from B, I always get a hit with the wall with a fraction of 0, no matter which direction I sweep to, and my character got stuck.
For test purpose, I tried sweeping from B away from the wall along wall's normal direction, or sweeping reversely from B to A, always got hit at 0 fraction. It seems B has already penetrated. This isn't consistent with the first sweep, as it's already told me B was safe.
How is that subsequent sweeps are not consistent. What could I have missed?
Some more info:
- Distance from A to B is small, as it's a delta move between frames.
- I could always keep A and B away a litte bit from wall when user moves against the wall, but I couldn't prevent user from coming very close to the wall from side ways.
Thanks a lot
1 post • Page 1 of 1