tab format

This commit is contained in:
songchengjiang 2015-06-29 11:48:43 +08:00
parent 7befab0f7b
commit 070705949b
1 changed files with 7 additions and 7 deletions

View File

@ -177,7 +177,7 @@ void Physics3DComponent::setSyncFlag(PhysicsSyncFlag syncFlag)
void Physics3DComponent::syncPhysicsToNode()
{
if (_physics3DObj->getObjType() == Physics3DObject::PhysicsObjType::RIGID_BODY
|| _physics3DObj->getObjType() == Physics3DObject::PhysicsObjType::COLLIDER)
|| _physics3DObj->getObjType() == Physics3DObject::PhysicsObjType::COLLIDER)
{
Mat4 parentMat;
if (_owner->getParent())
@ -211,7 +211,7 @@ void Physics3DComponent::syncPhysicsToNode()
void Physics3DComponent::syncNodeToPhysics()
{
if (_physics3DObj->getObjType() == Physics3DObject::PhysicsObjType::RIGID_BODY
|| _physics3DObj->getObjType() == Physics3DObject::PhysicsObjType::COLLIDER)
|| _physics3DObj->getObjType() == Physics3DObject::PhysicsObjType::COLLIDER)
{
auto mat = _owner->getNodeToWorldTransform();
//remove scale, no scale support for physics
@ -236,11 +236,11 @@ void Physics3DComponent::syncNodeToPhysics()
motionState->setWorldTransform(convertMat4TobtTransform(mat));
body->setMotionState(motionState);
}
else if (_physics3DObj->getObjType() == Physics3DObject::PhysicsObjType::COLLIDER)
{
auto object = static_cast<Physics3DCollider*>(_physics3DObj)->getGhostObject();
object->setWorldTransform(convertMat4TobtTransform(mat));
}
else if (_physics3DObj->getObjType() == Physics3DObject::PhysicsObjType::COLLIDER)
{
auto object = static_cast<Physics3DCollider*>(_physics3DObj)->getGhostObject();
object->setWorldTransform(convertMat4TobtTransform(mat));
}
}
}