Skip to main content

RaycastHit3D

APJS Script API reference for the RaycastHit3D class.

TypeNameInterface Description
Variablescollider: 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.

VariablescolliderObject: SceneObject | null

Function: The SceneObject that owns the hit collider. This is null if APJS cannot resolve the hit collider back to a SceneObject.

Variablesnormal: Vector3f

Function: World-space surface normal at the hit point.

Variablespoint: Vector3f

Function: World-space point where the ray first touched this hit.

Functionsconstructor(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) {
}
}
Copyright © 2026 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalTerms of ServicePrivacy PolicyCookies