don't send AVATAR_SELF_ID over wire
Showing the changes to libraries/physics/src/EntityMotionState.cpp (1 of 4 files). Show all
Unified · Split
| @@ -199,15 +199,12 @@ void EntityMotionState::getWorldTransform(btTransform& worldTrans) const { · 198 unmodified lines | ||
| 199 | 199 | return; |
| 200 | 200 | } |
| 201 | 201 | assert(entityTreeIsLocked()); |
| 202 | − if (_motionType == MOTION_TYPE_KINEMATIC) { | |
| 202 | + if (_motionType == MOTION_TYPE_KINEMATIC && !_entity->hasAncestorOfType(NestableType::Avatar)) { | |
| 203 | 203 | BT_PROFILE("kinematicIntegration"); |
| 204 | 204 | // This is physical kinematic motion which steps strictly by the subframe count |
| 205 | 205 | // of the physics simulation and uses full gravity for acceleration. |
| 206 | − if (_entity->hasAncestorOfType(NestableType::Avatar)) { | |
| 207 | − _entity->setAcceleration(glm::vec3(0.0f)); | |
| 208 | − } else { | |
| 209 | − _entity->setAcceleration(_entity->getGravity()); | |
| 210 | − } | |
| 206 | + _entity->setAcceleration(_entity->getGravity()); | |
| 207 | + | |
| 211 | 208 | uint32_t thisStep = ObjectMotionState::getWorldSimulationStep(); |
| 212 | 209 | float dt = (thisStep - _lastKinematicStep) * PHYSICS_ENGINE_FIXED_SUBSTEP; |
| 213 | 210 | _entity->stepKinematicMotion(dt); |