MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / updatePhysics

Method updatePhysics

testbed/scenes/joints/JointsScene.cpp:59–66  ·  view source on GitHub ↗

Update the physics world (take a simulation step)

Source from the content-addressed store, hash-verified

57
58// Update the physics world (take a simulation step)
59void JointsScene::updatePhysics() {
60
61 // Update the motor speed of the Slider Joint (to move up and down)
62 double motorSpeed = 2.0 * std::cos(mEngineSettings.elapsedTime.count() * 1.5);
63 mSliderJoint->setMotorSpeed(rp3d::decimal(motorSpeed));
64
65 SceneDemo::updatePhysics();
66}
67
68// Create the physics world
69void JointsScene::createPhysicsWorld() {

Callers

nothing calls this directly

Calls 1

setMotorSpeedMethod · 0.45

Tested by

no test coverage detected