Table of Contents

Class Physics

Namespace
BasilEngine
Assembly
BasilEngine.dll
[NativeHeader("Bindings/ManagedPhysics.hpp")]
[NativeClass("ManagedPhysics", ".")]
public class Physics
Inheritance
Physics
Inherited Members

Methods

Raycast(Vector3, Vector3, out RaycastHit, float, bool)

Casts a ray in the physics world.

public static bool Raycast(Vector3 origin, Vector3 direction, out RaycastHit hit, float maxDistance = 1000, bool ignoreTriggers = true)

Parameters

origin Vector3

World-space origin of the ray.

direction Vector3

Normalized direction to cast along.

hit RaycastHit

Information about the hit if one occurred.

maxDistance float

Maximum distance the ray should travel.

ignoreTriggers bool

True to ignore trigger colliders.

Returns

bool

True if the ray intersected a collider.