- Timestamp:
- 02/01/10 16:26:20 (6 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
plugins/branches/0185_GEN_PHYSICS_REFACTOR_2/ZBullet/src/PhysicsActor.cpp
r3352 r3353 373 373 PhysicsActor::getTorque() 374 374 { 375 Math::Vector3 velocity; 376 btRigidBodyGetTorque(m_pActor, velocity.m_array); 377 m_torque = velocity; 375 btVector3 tquat = m_pActor->getTotalTorque(); 376 m_torque.m_x = tquat.x(); 377 m_torque.m_y = tquat.y(); 378 m_torque.m_z = tquat.z(); 378 379 return m_torque; 379 380 } … … 510 511 PhysicsActor::applyTorque(const Math::Vector3& _torque) 511 512 { 512 btRigidBodyAddTorque(m_pActor, _torque.m_array); 513 btVector3 tquat = btVector3(_torque.m_x,_torque.m_y,_torque.m_z); 514 m_pActor->applyTorque(tquat);//todo: crosscheck consistency, and if this one acts too far differently than newton, use applyTorqueImpulse, as that accounts for an inertial tensor 513 515 } 514 516
