DayZ 1.24
Loading...
Searching...
No Matches
DayZPhysics.c
Go to the documentation of this file.
44
45
50{
53
56
57 float radius;
58
64
73 int type;
74
75 bool sorted;
77
79 {
80 begPos = vBeg;
81 endPos = vEnd;
84
85 // default values
86 with = null;
87 flags = CollisionFlags.NEARESTCONTACT;
89 sorted = false;
90 groundOnly = false;
91 }
92};
93
94
114
116{
118 {
119 return true;
120 }
121};
122
124{
125 private void DayZPhysics() {}
126 private void ~DayZPhysics() {}
127
199 proto static bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, /*out*/ set<Object> results = NULL, Object with = NULL, Object ignore = NULL, bool sorted = false, bool ground_only = false, int iType = ObjIntersectView, float radius = 0.0, CollisionFlags flags = CollisionFlags.NEARESTCONTACT);
200
201 //I am so sorry about this, I am unable to change RaycastRV above without breaking rest of DZ
202 //proto static bool RaycastRVExt(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, /*out*/ array<string> resultSurfaces = NULL, /*out*/ array<Object> resultObjects = NULL, Object with = NULL, Object ignore = NULL, bool sorted = false, bool ground_only = false, int iType = ObjIntersectView, float radius = 0.0, CollisionFlags flags = CollisionFlags.NEARESTCONTACT);
203
204 proto static bool GetHitSurface(Object other, vector begPos, vector endPos, string surface);
205
206 proto static bool GetHitSurfaceAndLiquid(Object other, vector begPos, vector endPos, string surface, out int liquidType);
207
209
210
212
214
215
217
219
221
223
225
227
229
230}
PhxInteractionLayers
Definition DayZPhysics.c:2
@ ITEM_LARGE
Definition DayZPhysics.c:38
@ AI_COMPLEX
Definition DayZPhysics.c:31
@ TRIGGER_NOTERRAIN
Definition DayZPhysics.c:35
@ DYNAMICITEM_NOCHAR
Definition DayZPhysics.c:10
@ TRIGGER
Definition DayZPhysics.c:34
@ BUILDING
Definition DayZPhysics.c:6
@ ITEM_SMALL
Definition DayZPhysics.c:37
@ DYNAMICITEM
Definition DayZPhysics.c:9
@ CHARACTER_NO_GRAVITY
Definition DayZPhysics.c:13
@ WATERLAYER
Definition DayZPhysics.c:22
@ TERRAIN
Definition DayZPhysics.c:23
@ TEMP
Definition DayZPhysics.c:42
@ GHOST
Definition DayZPhysics.c:25
@ AI_NO_COLLISION
Definition DayZPhysics.c:30
@ RAGDOLL
Definition DayZPhysics.c:20
@ CHARACTER
Definition DayZPhysics.c:7
@ DEFAULT
Definition DayZPhysics.c:5
@ FIREGEOM
Redefinition of 'RAGDOLL_NO_CHARACTER'.
Definition DayZPhysics.c:17
@ AI
Definition DayZPhysics.c:29
@ RAGDOLL_NO_CHARACTER
Definition DayZPhysics.c:14
@ ROADWAY
Definition DayZPhysics.c:11
@ TINYCAPSULE
Definition DayZPhysics.c:33
@ WORLDBOUNDS
Definition DayZPhysics.c:26
@ VEHICLE_NOTERRAIN
Definition DayZPhysics.c:12
@ FENCE
Definition DayZPhysics.c:27
@ VEHICLE
Definition DayZPhysics.c:8
@ CAMERA
Definition DayZPhysics.c:40
@ DOOR
Definition DayZPhysics.c:19
@ NOCOLLISION
Definition DayZPhysics.c:3
bool OnContact(IEntity other, Contact contact)
static proto bool GetHitSurface(Object other, vector begPos, vector endPos, string surface)
void ~DayZPhysics()
static proto bool SphereOverlapBullet(vector position, float radius, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback)
void DayZPhysics()
static proto bool GetHitSurfaceAndLiquid(Object other, vector begPos, vector endPos, string surface, out int liquidType)
static proto bool GeometryOverlapBullet(vector transform[4], dGeom geometry, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback)
static proto bool RaycastRV(vector begPos, vector endPos, out vector contactPos, out vector contactDir, out int contactComponent, set< Object > results=NULL, Object with=NULL, Object ignore=NULL, bool sorted=false, bool ground_only=false, int iType=ObjIntersectView, float radius=0.0, CollisionFlags flags=CollisionFlags.NEARESTCONTACT)
Raycasts world by given parameters.
static proto bool EntityOverlapSingleBullet(vector transform[4], IEntity entity, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback)
static proto bool BoxOverlapBullet(vector transform[4], vector extents, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback)
static proto bool EntityOverlapBullet(vector transform[4], IEntity entity, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback)
static proto bool CapsuleOverlapBullet(vector transform[4], float radius, float height, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback)
static proto bool SphereCastBullet(vector begPos, vector endPos, float radius, PhxInteractionLayers layerMask, Object ignoreObj, out Object hitObject, out vector hitPosition, out vector hitNormal, out float hitFraction)
static proto bool RayCastBullet(vector begPos, vector endPos, PhxInteractionLayers layerMask, Object ignoreObj, out Object hitObject, out vector hitPosition, out vector hitNormal, out float hitFraction)
static proto bool CylinderOverlapBullet(vector transform[4], vector extents, PhxInteractionLayers layerMask, notnull CollisionOverlapCallback callback)
static proto bool RaycastRVProxy(notnull RaycastRVParams in, out notnull array< ref RaycastRVResult > results, array< Object > excluded=null)
TODO doc.
Definition EnScript.c:118
vector endPos
end position of raycast (e.g. player direction)
Definition DayZPhysics.c:52
bool groundOnly
raycasts only ground (ignores all objects). Default value is false if not needed.
Definition DayZPhysics.c:76
bool sorted
used only if groundOnly = false
Definition DayZPhysics.c:75
Object with
ignore object with this object, otherwise collision hits, used only if groundOnly is false
Definition DayZPhysics.c:55
float radius
radius along the ray tested
Definition DayZPhysics.c:57
vector begPos
begin position of raycast (e.g. player position)
Definition DayZPhysics.c:51
void RaycastRVParams(vector vBeg, vector vEnd, Object pIgnore=null, float fRadius=0.0)
Definition DayZPhysics.c:78
Object ignore
ignore this object in collision, used only if groundOnly is false
Definition DayZPhysics.c:54
CollisionFlags flags
Definition DayZPhysics.c:63
Object obj
object,that we collide with (NULL if none), If hierLevel > 0 object is the proxy object
int component
index of component in corresponding geometry level
bool entry
is false if begining point was TriggerInsider
bool exit
is false if end point was inside
vector dir
direction outside (in world coord) or (in case of line-object collision) direction and size of the in...
int hierLevel
which hierarchy level is the collision detected at, == 0 = objects in landscape, > 0 = proxy
SurfaceInfo surface
surface material info handle
vector pos
position of collision (in world coord)
Object parent
if hierLevel > 0 most parent of the proxy object
CollisionFlags
Definition EnDebug.c:141