DayZ Scripts
PC Stable Documentation
 
Loading...
Searching...
No Matches
PhysicsJoint Class Reference

Private Member Functions

proto external void Destroy ()
 Destroys joint.
 
proto external void Destroy ()
 Destroys joint.
 

Static Private Member Functions

static proto PhysicsHingeJoint CreateHinge (notnull IEntity ent1, IEntity ent2, vector point1, vector axis1, vector point2, vector axis2, bool disableCollisions, float breakThreshold=-1)
 
static proto PhysicsHingeJoint CreateHinge2 (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 
static proto PhysicsBallSocketJoint CreateBallSocket (notnull IEntity ent1, IEntity ent2, vector point1, vector point2, bool disableCollisions, float breakThreshold=-1)
 
static proto PhysicsFixedJoint CreateFixed (notnull IEntity ent1, IEntity ent2, vector point1, vector point2, bool disableCollisions, float breakThreshold=-1)
 
static proto PhysicsConeTwistJoint CreateConeTwist (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 
static proto PhysicsSliderJoint CreateSlider (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 
static proto Physics6DOFJoint Create6DOF (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 
static proto Physics6DOFSpringJoint Create6DOFSpring (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 
static proto PhysicsHingeJoint CreateHinge (notnull IEntity ent1, IEntity ent2, vector point1, vector axis1, vector point2, vector axis2, bool disableCollisions, float breakThreshold=-1)
 
static proto PhysicsHingeJoint CreateHinge2 (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 
static proto PhysicsBallSocketJoint CreateBallSocket (notnull IEntity ent1, IEntity ent2, vector point1, vector point2, bool disableCollisions, float breakThreshold=-1)
 
static proto PhysicsFixedJoint CreateFixed (notnull IEntity ent1, IEntity ent2, vector point1, vector point2, bool disableCollisions, float breakThreshold=-1)
 
static proto PhysicsConeTwistJoint CreateConeTwist (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 
static proto PhysicsSliderJoint CreateSlider (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 
static proto Physics6DOFJoint Create6DOF (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 
static proto Physics6DOFSpringJoint Create6DOFSpring (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 

Member Function Documentation

◆ Create6DOF() [1/2]

static proto Physics6DOFJoint 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);
Definition EnEntity.c:165
Definition Physics6DOFJoint.c:25
proto external void SetAngularLimits(vector angularLower, vector angularUpper)
proto external void SetLimit(int axis, float limitLower, float limitUpper)
Definition PhysicsJoint.c:23
static proto Physics6DOFJoint Create6DOF(notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
Definition EnConvert.c:119
static const vector Forward
Definition EnConvert.c:122
static const vector Up
Definition EnConvert.c:120
static const vector Zero
Definition EnConvert.c:123
Parameters
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

◆ Create6DOF() [2/2]

static proto Physics6DOFJoint 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);
Parameters
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

◆ Create6DOFSpring() [1/2]

static proto Physics6DOFSpringJoint Create6DOFSpring ( notnull IEntity  ent1,
IEntity  ent2,
vector  matrix1[4],
vector  matrix2[4],
bool  disableCollisions,
float  breakThreshold = -1 
)
staticprivate

Creates DOF spring 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 };
Physics6DOFSpringJoint joint = PhysicsJoint.Create6DOF(entity1, entity2, mat1, mat2, false);
joint.SetLimit(0, -1, 1);
joint.SetSpring(0, 1, 1);
Definition Physics6DOFSpringJoint.c:11
proto external void SetSpring(int axis, float stiffness, float damping)
Parameters
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

◆ Create6DOFSpring() [2/2]

static proto Physics6DOFSpringJoint Create6DOFSpring ( notnull IEntity  ent1,
IEntity  ent2,
vector  matrix1[4],
vector  matrix2[4],
bool  disableCollisions,
float  breakThreshold = -1 
)
staticprivate

Creates DOF spring 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 };
Physics6DOFSpringJoint joint = PhysicsJoint.Create6DOF(entity1, entity2, mat1, mat2, false);
joint.SetLimit(0, -1, 1);
joint.SetSpring(0, 1, 1);
Parameters
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

◆ CreateBallSocket() [1/2]

static proto PhysicsBallSocketJoint CreateBallSocket ( notnull IEntity  ent1,
IEntity  ent2,
vector  point1,
vector  point2,
bool  disableCollisions,
float  breakThreshold = -1 
)
staticprivate

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

IEntity entity1 = GetWorld().FindEntityByName("entity1");
IEntity entity2 = GetWorld().FindEntityByName("entity1");
PhysicsJoint.CreateBallSocket(entity1, entity2, vector.Right, -vector.Right, false);
static proto PhysicsBallSocketJoint CreateBallSocket(notnull IEntity ent1, IEntity ent2, vector point1, vector point2, bool disableCollisions, float breakThreshold=-1)
Parameters
ent1Entity that will be part of the joint, mandatory
ent2Other entity that will be part of the joint, optional
point1Joint position in reference frame of ent1
point2Joint position in reference frame of ent2
disableCollisionsTrue to disable collisions between connected entities
breakThresholdMaximum impulse to break the joint. Use -1 for unbreakable joint

◆ CreateBallSocket() [2/2]

static proto PhysicsBallSocketJoint CreateBallSocket ( notnull IEntity  ent1,
IEntity  ent2,
vector  point1,
vector  point2,
bool  disableCollisions,
float  breakThreshold = -1 
)
staticprivate

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

IEntity entity1 = GetWorld().FindEntityByName("entity1");
IEntity entity2 = GetWorld().FindEntityByName("entity1");
PhysicsJoint.CreateBallSocket(entity1, entity2, vector.Right, -vector.Right, false);
Parameters
ent1Entity that will be part of the joint, mandatory
ent2Other entity that will be part of the joint, optional
point1Joint position in reference frame of ent1
point2Joint position in reference frame of ent2
disableCollisionsTrue to disable collisions between connected entities
breakThresholdMaximum impulse to break the joint. Use -1 for unbreakable joint

◆ CreateConeTwist() [1/2]

static proto PhysicsConeTwistJoint CreateConeTwist ( notnull IEntity  ent1,
IEntity  ent2,
vector  matrix1[4],
vector  matrix2[4],
bool  disableCollisions,
float  breakThreshold = -1 
)
staticprivate

Creates cone twist 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 };
PhysicsJoint.CreateConeTwist(entity1, entity2, mat1, mat2, false);
static proto PhysicsConeTwistJoint CreateConeTwist(notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
Parameters
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 (twist is x-axis, swings are z and y axes)
matrix2Joint transformation in reference frame of ent2 (twist is x-axis, swings are z and y axes)
disableCollisionsTrue to disable collisions between connected entities
breakThresholdMaximum impulse to break the joint. Use -1 for unbreakable joint

◆ CreateConeTwist() [2/2]

static proto PhysicsConeTwistJoint CreateConeTwist ( notnull IEntity  ent1,
IEntity  ent2,
vector  matrix1[4],
vector  matrix2[4],
bool  disableCollisions,
float  breakThreshold = -1 
)
staticprivate

Creates cone twist 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 };
PhysicsJoint.CreateConeTwist(entity1, entity2, mat1, mat2, false);
Parameters
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 (twist is x-axis, swings are z and y axes)
matrix2Joint transformation in reference frame of ent2 (twist is x-axis, swings are z and y axes)
disableCollisionsTrue to disable collisions between connected entities
breakThresholdMaximum impulse to break the joint. Use -1 for unbreakable joint

◆ CreateFixed() [1/2]

static proto PhysicsFixedJoint CreateFixed ( notnull IEntity  ent1,
IEntity  ent2,
vector  point1,
vector  point2,
bool  disableCollisions,
float  breakThreshold = -1 
)
staticprivate

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

IEntity entity1 = GetWorld().FindEntityByName("entity1");
IEntity entity2 = GetWorld().FindEntityByName("entity1");
PhysicsJoint.CreateFixed(entity1, entity2, vector.Right, -vector.Right, false);
static proto PhysicsFixedJoint CreateFixed(notnull IEntity ent1, IEntity ent2, vector point1, vector point2, bool disableCollisions, float breakThreshold=-1)
Parameters
ent1Entity that will be part of the joint, mandatory
ent2Other entity that will be part of the joint, optional
point1Joint position in reference frame of ent1
point2Joint position in reference frame of ent2
disableCollisionsTrue to disable collisions between connected entities
breakThresholdMaximum impulse to break the joint. Use -1 for unbreakable joint

◆ CreateFixed() [2/2]

static proto PhysicsFixedJoint CreateFixed ( notnull IEntity  ent1,
IEntity  ent2,
vector  point1,
vector  point2,
bool  disableCollisions,
float  breakThreshold = -1 
)
staticprivate

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

IEntity entity1 = GetWorld().FindEntityByName("entity1");
IEntity entity2 = GetWorld().FindEntityByName("entity1");
PhysicsJoint.CreateFixed(entity1, entity2, vector.Right, -vector.Right, false);
Parameters
ent1Entity that will be part of the joint, mandatory
ent2Other entity that will be part of the joint, optional
point1Joint position in reference frame of ent1
point2Joint position in reference frame of ent2
disableCollisionsTrue to disable collisions between connected entities
breakThresholdMaximum impulse to break the joint. Use -1 for unbreakable joint

◆ CreateHinge() [1/2]

static proto PhysicsHingeJoint CreateHinge ( notnull IEntity  ent1,
IEntity  ent2,
vector  point1,
vector  axis1,
vector  point2,
vector  axis2,
bool  disableCollisions,
float  breakThreshold = -1 
)
staticprivate

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

IEntity entity1 = GetWorld().FindEntityByName("entity1");
IEntity entity2 = GetWorld().FindEntityByName("entity1");
PhysicsJoint.CreateHinge(entity1, entity2, vector.Right, vector.Up, -vector.Right, vector.Up, false);
static proto PhysicsHingeJoint CreateHinge(notnull IEntity ent1, IEntity ent2, vector point1, vector axis1, vector point2, vector axis2, bool disableCollisions, float breakThreshold=-1)
Parameters
ent1Entity that will be part of the joint, mandatory
ent2Other entity that will be part of the joint, optional
point1Joint position in reference frame of ent1
axis1Joint axis in reference frame of ent1
point2Joint position in reference frame of ent2
axis2Joint axis in reference frame of ent2
disableCollisionsTrue to disable collisions between connected entities
breakThresholdMaximum impulse to break the joint. Use -1 for unbreakable joint

◆ CreateHinge() [2/2]

static proto PhysicsHingeJoint CreateHinge ( notnull IEntity  ent1,
IEntity  ent2,
vector  point1,
vector  axis1,
vector  point2,
vector  axis2,
bool  disableCollisions,
float  breakThreshold = -1 
)
staticprivate

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

IEntity entity1 = GetWorld().FindEntityByName("entity1");
IEntity entity2 = GetWorld().FindEntityByName("entity1");
PhysicsJoint.CreateHinge(entity1, entity2, vector.Right, vector.Up, -vector.Right, vector.Up, false);
Parameters
ent1Entity that will be part of the joint, mandatory
ent2Other entity that will be part of the joint, optional
point1Joint position in reference frame of ent1
axis1Joint axis in reference frame of ent1
point2Joint position in reference frame of ent2
axis2Joint axis in reference frame of ent2
disableCollisionsTrue to disable collisions between connected entities
breakThresholdMaximum impulse to break the joint. Use -1 for unbreakable joint

◆ CreateHinge2() [1/2]

static proto PhysicsHingeJoint CreateHinge2 ( notnull IEntity  ent1,
IEntity  ent2,
vector  matrix1[4],
vector  matrix2[4],
bool  disableCollisions,
float  breakThreshold = -1 
)
staticprivate

Creates hinge 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.Forward, vector.Up, vector.Right };
vector mat2[4] = { vector.Right, -vector.Forward, vector.Up, -vector.Right };
PhysicsJoint.CreateHinge2(entity1, entity2, mat1, mat2, false);
static proto PhysicsHingeJoint CreateHinge2(notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
Parameters
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 (hinge is z-axis)
matrix2Joint transformation in reference frame of ent2 (hinge is z-axis)
disableCollisionsTrue to disable collisions between connected entities
breakThresholdMaximum impulse to break the joint. Use -1 for unbreakable joint

◆ CreateHinge2() [2/2]

static proto PhysicsHingeJoint CreateHinge2 ( notnull IEntity  ent1,
IEntity  ent2,
vector  matrix1[4],
vector  matrix2[4],
bool  disableCollisions,
float  breakThreshold = -1 
)
staticprivate

Creates hinge 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.Forward, vector.Up, vector.Right };
vector mat2[4] = { vector.Right, -vector.Forward, vector.Up, -vector.Right };
PhysicsJoint.CreateHinge2(entity1, entity2, mat1, mat2, false);
Parameters
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 (hinge is z-axis)
matrix2Joint transformation in reference frame of ent2 (hinge is z-axis)
disableCollisionsTrue to disable collisions between connected entities
breakThresholdMaximum impulse to break the joint. Use -1 for unbreakable joint

◆ CreateSlider() [1/2]

static proto PhysicsSliderJoint CreateSlider ( notnull IEntity  ent1,
IEntity  ent2,
vector  matrix1[4],
vector  matrix2[4],
bool  disableCollisions,
float  breakThreshold = -1 
)
staticprivate

Creates slider 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 };
PhysicsJoint.CreateSlider(entity1, entity2, mat1, mat2, false);
static proto PhysicsSliderJoint CreateSlider(notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
Parameters
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 (slide is x-axis)
matrix2Joint transformation in reference frame of ent2 (slide is x-axis)
disableCollisionsTrue to disable collisions between connected entities
breakThresholdMaximum impulse to break the joint. Use -1 for unbreakable joint

◆ CreateSlider() [2/2]

static proto PhysicsSliderJoint CreateSlider ( notnull IEntity  ent1,
IEntity  ent2,
vector  matrix1[4],
vector  matrix2[4],
bool  disableCollisions,
float  breakThreshold = -1 
)
staticprivate

Creates slider 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 };
PhysicsJoint.CreateSlider(entity1, entity2, mat1, mat2, false);
Parameters
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 (slide is x-axis)
matrix2Joint transformation in reference frame of ent2 (slide is x-axis)
disableCollisionsTrue to disable collisions between connected entities
breakThresholdMaximum impulse to break the joint. Use -1 for unbreakable joint

◆ Destroy() [1/2]

proto external void Destroy ( )
private

Destroys joint.

◆ Destroy() [2/2]

proto external void Destroy ( )
private

Destroys joint.


The documentation for this class was generated from the following file: