Remove an assert in Bullet for the Character physics.
This assert happens all the time for character physics in debug mode. In release mode, the assert is skipped but the code is still incorrect although it does not cause any crash strangely.
This commit is contained in:
@@ -29,10 +29,13 @@ subject to the following restrictions:
|
||||
static btVector3
|
||||
getNormalizedVector(const btVector3& v)
|
||||
{
|
||||
btVector3 n = v.normalized();
|
||||
if (n.length() < SIMD_EPSILON) {
|
||||
n.setValue(0, 0, 0);
|
||||
}
|
||||
btScalar l = v.length();
|
||||
btVector3 n = v;
|
||||
if (l < SIMD_EPSILON) {
|
||||
n.setValue(0,0,0);
|
||||
} else {
|
||||
n /= l;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user