Changeset View
Changeset View
Standalone View
Standalone View
source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
| Show First 20 Lines • Show All 2,088 Lines • ▼ Show 20 Lines | case PHY_GENERIC_6DOF_CONSTRAINT: | ||||
| rotMotor->m_enableMotor = (value1 > 0.f); | rotMotor->m_enableMotor = (value1 > 0.f); | ||||
| rotMotor->m_targetVelocity = value0; | rotMotor->m_targetVelocity = value0; | ||||
| rotMotor->m_maxMotorForce = value1; | rotMotor->m_maxMotorForce = value1; | ||||
| break; | break; | ||||
| } | } | ||||
| case 12: case 13: case 14: case 15: case 16: case 17: | case 12: case 13: case 14: case 15: case 16: case 17: | ||||
| { | { | ||||
| //param 13-17 are for motorized springs on each of the degrees of freedom | //param 12-17 are for motorized springs on each of the degrees of freedom | ||||
| btGeneric6DofSpringConstraint* genCons = (btGeneric6DofSpringConstraint*)typedConstraint; | btGeneric6DofSpringConstraint* genCons = (btGeneric6DofSpringConstraint*)typedConstraint; | ||||
| int springIndex = param-12; | int springIndex = param-12; | ||||
| if (value0!=0.f) | if (value0!=0.f) | ||||
| { | { | ||||
| bool springEnabled = true; | bool springEnabled = true; | ||||
| genCons->setStiffness(springIndex,value0); | genCons->setStiffness(springIndex,value0); | ||||
| genCons->setDamping(springIndex,value1); | genCons->setDamping(springIndex,value1); | ||||
| genCons->enableSpring(springIndex,springEnabled); | genCons->enableSpring(springIndex,springEnabled); | ||||
| ▲ Show 20 Lines • Show All 1,453 Lines • Show Last 20 Lines | |||||