Ylands:Tile - YPhysics - Raycast Plane

From Bohemia Interactive Community
Jump to navigation Jump to search

Raycast Plane(Plane normal, Plane point, Ray origin, Ray direction, On hit, On missed)

YlandsTile-1433.png

static raycastPlane(planeNormal: YVector3, planePoint: YVector3, rayOrigin: YVector3, rayDirection: YVector3, onHit: (point: YVector3) => void, onMissed: () => void): void;

Parameters

planeNormal

planePoint

rayOrigin

rayDirection

onHit

onMissed

Availability

Client, Server, Custom Controller

Description

Casts a ray, from origin point, in a direction, of a maximal length, against a plane constructed at the given point using the given normal. If the ray intersects this plane, exact point of intersection is returned

Notes