History

PhysicsEngine doesn't need AvatarData

MyAvatar now owns its CharacterController fix for bug of phantom collision obj when avatar's physics are disabled

Andrew Meadows committed 11 years ago

Commit 44eca081 parent 49f5de28 files · +194 −137Browse files

Showing the changes to interface/src/Application.cpp (1 of 8 files). Show all

Unified · Split

interface/src/Application.cpp+3−4
@@ -1903,8 +1903,6 @@ void Application::init() { · 1902 unmodified lines
19031903 _physicsEngine.init(&_entityEditSender);
19041904
19051905
1906− _physicsEngine.setAvatarData(_myAvatar);
1907−
19081906 auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>();
19091907
19101908 connect(&_physicsEngine, &EntitySimulation::entityCollisionWithEntity,
@@ -2191,6 +2189,7 @@ void Application::update(float deltaTime) { · 280 unmodified lines
21912189
21922190 {
21932191 PerformanceTimer perfTimer("physics");
2192+ _myAvatar->preSimulation();
21942193 _physicsEngine.stepSimulation();
21952194 }
21962195
@@ -4207,7 +4206,7 @@ void Application::checkSkeleton() { · 2010 unmodified lines
42074206 _myAvatar->setSkeletonModelURL(DEFAULT_BODY_MODEL_URL);
42084207 _myAvatar->sendIdentityPacket();
42094208 } else {
4210− _myAvatar->updateLocalAABox();
4211− _physicsEngine.setAvatarData(_myAvatar);
4209+ _myAvatar->updateCharacterController();
4210+ _physicsEngine.setCharacterController(_myAvatar->getCharacterController());
42124211 }
42134212 }