Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
PhysicsJoint Class Reference
Inheritance diagram for PhysicsJoint:
Physics6DOFJoint Physics6DOFJoint PhysicsBallSocketJoint PhysicsBallSocketJoint PhysicsConeTwistJoint PhysicsConeTwistJoint PhysicsFixedJoint PhysicsFixedJoint PhysicsHingeJoint PhysicsHingeJoint PhysicsSliderJoint PhysicsSliderJoint

Private Member Functions

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

Static Private Member Functions

static proto Physics6DOFJoint Create6DOF (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 Creates 6 DOF joint.
static proto Physics6DOFJoint Create6DOF (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 Creates 6 DOF joint.
static proto Physics6DOFSpringJoint Create6DOFSpring (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 Creates DOF spring joint.
static proto Physics6DOFSpringJoint Create6DOFSpring (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 Creates DOF spring joint.
static proto PhysicsBallSocketJoint CreateBallSocket (notnull IEntity ent1, IEntity ent2, vector point1, vector point2, bool disableCollisions, float breakThreshold=-1)
 Creates ball socket joint.
static proto PhysicsBallSocketJoint CreateBallSocket (notnull IEntity ent1, IEntity ent2, vector point1, vector point2, bool disableCollisions, float breakThreshold=-1)
 Creates ball socket joint.
static proto PhysicsConeTwistJoint CreateConeTwist (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 Creates cone twist joint.
static proto PhysicsConeTwistJoint CreateConeTwist (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 Creates cone twist joint.
static proto PhysicsFixedJoint CreateFixed (notnull IEntity ent1, IEntity ent2, vector point1, vector point2, bool disableCollisions, float breakThreshold=-1)
 Creates fixed joint.
static proto PhysicsFixedJoint CreateFixed (notnull IEntity ent1, IEntity ent2, vector point1, vector point2, bool disableCollisions, float breakThreshold=-1)
 Creates fixed joint.
static proto PhysicsHingeJoint CreateHinge (notnull IEntity ent1, IEntity ent2, vector point1, vector axis1, vector point2, vector axis2, bool disableCollisions, float breakThreshold=-1)
 Creates hinge joint.
static proto PhysicsHingeJoint CreateHinge (notnull IEntity ent1, IEntity ent2, vector point1, vector axis1, vector point2, vector axis2, bool disableCollisions, float breakThreshold=-1)
 Creates hinge joint.
static proto PhysicsHingeJoint CreateHinge2 (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 Creates hinge joint.
static proto PhysicsHingeJoint CreateHinge2 (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 Creates hinge joint.
static proto PhysicsSliderJoint CreateSlider (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 Creates slider joint.
static proto PhysicsSliderJoint CreateSlider (notnull IEntity ent1, IEntity ent2, vector matrix1[4], vector matrix2[4], bool disableCollisions, float breakThreshold=-1)
 Creates slider joint.

Detailed Description

Definition at line 22 of file physicsjoint.c.

Member Function Documentation

◆ Create6DOF() [1/2]

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);
joint.SetAngularLimits(vector.Zero, vector.Zero);
Internal ancestor of all Entity implementations.
Definition enentity.c:165
proto external void SetAngularLimits(vector angularLower, vector angularUpper)
Sets angular limits of the joint.
proto external void SetLimit(int axis, float limitLower, float limitUpper)
Sets limits of the joint.
static const vector Forward
Definition enconvert.c:122
static const vector Up
Definition enconvert.c:120
int[] PhysicsJoint
Wrapper over joint simulation.
int[] Physics6DOFJoint
6 DOF joint simulation.
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]

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);
joint.SetAngularLimits(vector.Zero, vector.Zero);
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]

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.SetAngularLimits(vector.Zero, vector.Zero);
joint.SetSpring(0, 1, 1);
proto external void SetSpring(int axis, float stiffness, float damping)
Sets spring parameters on a particular axis.
int[] Physics6DOFSpringJoint
6 DOF spring joint simulation.
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]

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.SetAngularLimits(vector.Zero, vector.Zero);
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]

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)
Creates ball socket joint.
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]

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]

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

◆ CreateConeTwist() [2/2]

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]

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)
Creates fixed joint.
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]

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]

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)
Creates hinge joint.
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]

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]

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

◆ CreateHinge2() [2/2]

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]

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

◆ CreateSlider() [2/2]

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: