Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. void WalkableShape::setTransform(const MatrixF & mat)
  2. {
  3. mObjToWorld = mWorldToObj = mat;
  4. mWorldToObj.affineInverse();
  5.  
  6. // Update the world-space AABB.
  7. resetWorldBox();
  8.  
  9. // If we're in a SceneManager, sync our scene state.
  10. if( mSceneManager != NULL )
  11. mSceneManager->notifyObjectDirty( this );
  12.  
  13. if ( mPhysicsRep )
  14. { // We can't use kinematic target if we have attached objects, the new position won't
  15. // be set until after the collide/slide on the attached object
  16. if (mAttachments.size() > 0)
  17. mPhysicsRep->setTransform( mat );
  18. else
  19. mPhysicsRep->moveKinematicTo( mat );
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement