mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 14:47:41 +02:00
simpler EntityItem::simulate() bypass for bullet
This commit is contained in:
parent
85fd1fc14f
commit
dab1f026d7
1 changed files with 95 additions and 92 deletions
|
@ -587,6 +587,11 @@ bool EntityItem::isRestingOnSurface() const {
|
|||
}
|
||||
|
||||
void EntityItem::simulate(const quint64& now) {
|
||||
if (_physicsInfo) {
|
||||
// we rely on bullet for simulation, so bail
|
||||
return;
|
||||
}
|
||||
|
||||
bool wantDebug = false;
|
||||
|
||||
if (_lastSimulated == 0) {
|
||||
|
@ -636,7 +641,6 @@ void EntityItem::simulate(const quint64& now) {
|
|||
qDebug() << " ********** EntityItem::simulate() .... SETTING _lastSimulated=" << _lastSimulated;
|
||||
}
|
||||
|
||||
if (!_physicsInfo) {
|
||||
if (hasAngularVelocity()) {
|
||||
glm::quat rotation = getRotation();
|
||||
glm::vec3 angularVelocity = glm::radians(getAngularVelocity());
|
||||
|
@ -724,7 +728,7 @@ void EntityItem::simulate(const quint64& now) {
|
|||
qDebug() << " EPSILON_VELOCITY_LENGTH:" << EPSILON_VELOCITY_LENGTH;
|
||||
}
|
||||
|
||||
// if we've slowed considerably, then just stop moving
|
||||
// round velocity to zero if it's close enough...
|
||||
if (glm::length(velocity) <= EPSILON_VELOCITY_LENGTH) {
|
||||
velocity = NO_VELOCITY;
|
||||
}
|
||||
|
@ -740,7 +744,6 @@ void EntityItem::simulate(const quint64& now) {
|
|||
qDebug() << " old getAABox:" << getAABox();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_lastSimulated = now;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue