MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / onOriginShift

Method onOriginShift

physx/source/simulationcontroller/src/ScBodyCore.cpp:623–632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

621}
622
623void Sc::BodyCore::onOriginShift(const PxVec3& shift)
624{
625 mCore.body2World.p -= shift;
626 if(mSimStateData && (getFlags() & PxRigidBodyFlag::eKINEMATIC) && mSimStateData->getKinematicData()->targetValid)
627 mSimStateData->getKinematicData()->targetPose.p -= shift;
628
629 BodySim* b = getSim();
630 if(b)
631 b->onOriginShift(shift); // BodySim might not exist if actor has simulation disabled (PxActorFlag::eDISABLE_SIMULATION)
632}
633
634// PT: TODO: isn't that the same as BodyCore->getPxActor() now?
635PxActor* Sc::getPxActorFromBodyCore(Sc::BodyCore* r, PxActorType::Enum& type)

Callers 1

shiftOriginMethod · 0.45

Calls 2

getFlagsFunction · 0.85
getKinematicDataMethod · 0.80

Tested by

no test coverage detected