RaycastHit3D
APJS Script API reference for the RaycastHit3D class.
| Type | Name | Interface Description |
|---|---|---|
| Variables | collider: Collider | null | • Function: The collider component that the ray hit. This is null if the hit SceneObject does not expose a Collider component through APJS. |
| Variables | colliderObject: SceneObject | null | • Function: The SceneObject that owns the hit collider. This is null if APJS cannot resolve the hit collider back to a SceneObject. |
| Variables | normal: Vector3f | • Function: World-space surface normal at the hit point. |
| Variables | point: Vector3f | • Function: World-space point where the ray first touched this hit. |
| Functions | constructor(point: Vector3f, normal: Vector3f, collider: Collider | null, colliderObject: SceneObject | null) |
Examples
constructor(point: Vector3f, normal: Vector3f, collider: Collider | null, colliderObject: SceneObject | null)
let obj = new APJS.RaycastHit3D();
Use Case
@component()
export class NewBehaviourScript extends APJS.BasicScriptComponent {
onStart() {
// TODO: instantiate / use RaycastHit3D here
}
onUpdate(deltaTime: number) {
}
}