| 212 | |
| 213 | |
| 214 | void NpRigidDynamic::setLinearVelocity(const PxVec3& velocity, bool autowake) |
| 215 | { |
| 216 | NP_WRITE_CHECK(NpActor::getOwnerScene(*this)); |
| 217 | PX_CHECK_AND_RETURN(velocity.isFinite(), "PxRigidDynamic::setLinearVelocity: velocity is not valid."); |
| 218 | PX_CHECK_AND_RETURN(!(getScbBodyFast().getFlags() & PxRigidBodyFlag::eKINEMATIC), "PxRigidDynamic::setLinearVelocity: Body must be non-kinematic!"); |
| 219 | PX_CHECK_AND_RETURN(!(getScbBodyFast().getActorFlags() & PxActorFlag::eDISABLE_SIMULATION), "PxRigidDynamic::setLinearVelocity: Not allowed if PxActorFlag::eDISABLE_SIMULATION is set!"); |
| 220 | |
| 221 | Scb::Body& b = getScbBodyFast(); |
| 222 | b.setLinearVelocity(velocity); |
| 223 | |
| 224 | NpScene* scene = NpActor::getAPIScene(*this); |
| 225 | if(scene) |
| 226 | wakeUpInternalNoKinematicTest(b, (!velocity.isZero()), autowake); |
| 227 | } |
| 228 | |
| 229 | |
| 230 | void NpRigidDynamic::setAngularVelocity(const PxVec3& velocity, bool autowake) |
no test coverage detected