Edit Ball and Socket joint scene
This commit is contained in:
parent
67d480c4ee
commit
c4af071c08
|
@ -141,7 +141,7 @@ void BallAndSocketJointScene::createBallAndSocketJoint() {
|
||||||
mJoint = dynamic_cast<rp3d::BallAndSocketJoint*>(mPhysicsWorld->createJoint(jointInfo));
|
mJoint = dynamic_cast<rp3d::BallAndSocketJoint*>(mPhysicsWorld->createJoint(jointInfo));
|
||||||
mJoint->setConeLimitLocalAxisBody1(rp3d::Vector3(0, 1, 0));
|
mJoint->setConeLimitLocalAxisBody1(rp3d::Vector3(0, 1, 0));
|
||||||
mJoint->setConeLimitLocalAxisBody2(rp3d::Vector3(0, 1, 0));
|
mJoint->setConeLimitLocalAxisBody2(rp3d::Vector3(0, 1, 0));
|
||||||
mJoint->setConeLimitHalfAngle(10.0 * rp3d::PI_RP3D / 180.0);
|
mJoint->setConeLimitHalfAngle(45.0 * rp3d::PI_RP3D / 180.0);
|
||||||
mJoint->enableConeLimit(true);
|
mJoint->enableConeLimit(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -150,7 +150,4 @@ void BallAndSocketJointScene::createBallAndSocketJoint() {
|
||||||
void BallAndSocketJointScene::update() {
|
void BallAndSocketJointScene::update() {
|
||||||
|
|
||||||
SceneDemo::update();
|
SceneDemo::update();
|
||||||
|
|
||||||
std::cout << "Cone half angle: " << (mJoint->getConeHalfAngle() * 180.0 / rp3d::PI_RP3D) << " deg" << std::endl;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user