Wiki > Physics Debug

Physics class


Class responsible for calling the Unity Engine Physics and draw calculation. It has all the Unity implementation for checks, casts and overlaps.

Namespace: RotaryHeart.Lib.PhysicsExtension
Package: Physics Debug Extension

Syntax


public static class Physics

Properties


Accessibility Level Type Name Description
private static Color CAST_COLOR Global variable used when no cast color is passed as parameter.
private static int LAYER_MASK Global variable used when no layer is passed as parameter.
private static float MAX_DISTANCE Global variable used when no max distance is passed as parameter.
private static Quaternion ORIENTATION Global variable used when no orientation is passed as parameter.
private static QueryTriggerInteraction QUERY_TRIGGER_INTERACTION Global variable used when no querry trigger interaction is passed as parameter.

Since this system uses the same methods that Unity Engine Physics has, we will not be listing the methods available on this class. Instead we will show the new parameters that every method has. If you want to understand how a method works search in the Untiy documentation.

Parameters

preview
Type: PhysicsExtension.PreviewCondition
The preview condition for the lines (None, Editor, Game). Depending on this value is how the lines will be drawn; unless none is passed.
drawDuration
Type: System.Single
How many frames should the lines be drawn, use 0 to draw for 1 frame only.
hitColor
Type: UnityEngine.Color
Color to draw lines when something hits.
noHitColor
Type: UnityEngine.Color
Color to draw lines when nothing hits.

See also