DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ Create6DOF() [2/2]

static proto Physics6DOFJoint PhysicsJoint::Create6DOF ( notnull IEntity ent1,
IEntity ent2,
vector matrix1[4],
vector matrix2[4],
bool disableCollisions,
float breakThreshold = -1 )
staticprivate

Creates 6 DOF joint. Entities must be dynamic objects. Using only ent1 anchors it to the world.

IEntity entity1 = GetWorld().FindEntityByName("entity1");
IEntity entity2 = GetWorld().FindEntityByName("entity1");
vector mat1[4] = { vector.Right, vector.Up, vector.Forward, vector.Right };
vector mat2[4] = { vector.Right, vector.Up, vector.Forward, -vector.Right };
Physics6DOFJoint joint = PhysicsJoint.Create6DOF(entity1, entity2, mat1, mat2, false);
joint.SetLimit(0, -1, 1);
joint.SetAngularLimits(vector.Zero, vector.Zero);
Определения EnEntity.c:165
proto external void SetAngularLimits(vector angularLower, vector angularUpper)
proto external void SetLimit(int axis, float limitLower, float limitUpper)
static const vector Forward
Определения EnConvert.c:122
static const vector Up
Определения EnConvert.c:120
Определения EnConvert.c:119
int[] PhysicsJoint
Определения PhysicsJoint.c:21
int[] Physics6DOFJoint
Определения Physics6DOFJoint.c:23
Аргументы
ent1Entity that will be part of the joint, mandatory
ent2Other entity that will be part of the joint, optional
matrix1Joint transformation in reference frame of ent1
matrix2Joint transformation in reference frame of ent2
disableCollisionsTrue to disable collisions between connected entities
breakThresholdMaximum impulse to break the joint. Use -1 for unbreakable joint