MyAvatar now owns its CharacterController fix for bug of phantom collision obj when avatar's physics are disabled
Showing the changes to interface/src/Application.cpp (1 of 8 files). Show all
Unified · Split
| @@ -1903,8 +1903,6 @@ void Application::init() { · 1902 unmodified lines | ||
| 1903 | 1903 | _physicsEngine.init(&_entityEditSender); |
| 1904 | 1904 | |
| 1905 | 1905 | |
| 1906 | − _physicsEngine.setAvatarData(_myAvatar); | |
| 1907 | − | |
| 1908 | 1906 | auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>(); |
| 1909 | 1907 | |
| 1910 | 1908 | connect(&_physicsEngine, &EntitySimulation::entityCollisionWithEntity, |
| @@ -2191,6 +2189,7 @@ void Application::update(float deltaTime) { · 280 unmodified lines | ||
| 2191 | 2189 | |
| 2192 | 2190 | { |
| 2193 | 2191 | PerformanceTimer perfTimer("physics"); |
| 2192 | + _myAvatar->preSimulation(); | |
| 2194 | 2193 | _physicsEngine.stepSimulation(); |
| 2195 | 2194 | } |
| 2196 | 2195 | |
| @@ -4207,7 +4206,7 @@ void Application::checkSkeleton() { · 2010 unmodified lines | ||
| 4207 | 4206 | _myAvatar->setSkeletonModelURL(DEFAULT_BODY_MODEL_URL); |
| 4208 | 4207 | _myAvatar->sendIdentityPacket(); |
| 4209 | 4208 | } else { |
| 4210 | − _myAvatar->updateLocalAABox(); | |
| 4211 | − _physicsEngine.setAvatarData(_myAvatar); | |
| 4209 | + _myAvatar->updateCharacterController(); | |
| 4210 | + _physicsEngine.setCharacterController(_myAvatar->getCharacterController()); | |
| 4212 | 4211 | } |
| 4213 | 4212 | } |