Ejemplo n.º 1
0
void LinkedPhysicsEntity::setEnvironment(Environment* env) {
	Entity::setEnvironment(env);
	if (!addedToSimulation) {
		initializeJoints();
		Physics* physicsModule = (Physics*)SystemCore::getModuleByName("Physics");
		assert(physicsModule);
		physicsModule->addPhysicsObject(this);
		addedToSimulation = true;
	} // if
} // setEnvironment
Ejemplo n.º 2
0
void ArticulatedPhysicsEntity::setEnvironment(Environment* env)
{
	Entity::setEnvironment(env);
	if (articulatedBody && !addedToSimulation)
	{
		Physics* physicsModule = (Physics*)SystemCore::getModuleByName("Physics");
		assert(physicsModule);
		physicsModule->addPhysicsObject(this);
		addedToSimulation = true;
	} // if
} // setEnvironment