Physics¶
static class · namespace Hazel
Properties¶
Gravity¶
static
Methods¶
AddRadialImpulse(Vector3, float, float, EFalloffMode, bool)¶
static
public static void AddRadialImpulse(Vector3 origin, float radius, float strength, EFalloffMode falloff = EFalloffMode.Constant, bool velocityChange = false)
Adds a radial impulse to the scene. Any entity within the radius of the origin will be pushed/pulled according to the strength. You'd use this method for something like an explosion.
Parameters
| Name | Description |
|---|---|
origin |
The origin of the impulse in world space |
radius |
The radius of the area affected by the impulse (1 unit = 1 meter radius) |
strength |
The strength of the impulse |
falloff |
The falloff method used when calculating force over distance |
velocityChange |
Setting this value to true will make this impulse ignore an actors mass |
CastRay(RaycastData, SceneQueryHit)¶
static
CastShape(ShapeQueryData, SceneQueryHit)¶
static
OverlapShape(ShapeQueryData, SceneQueryHit[])¶
static
Performs an overlap scene query, returning an array of any colliders that the provided shape overlaps. Always allocates.
Parameters
| Name | Description |
|---|---|
shapeQueryData |
|
outHits |
Source: Hazel/Physics/Physics.cs