Skip to content

Get Sansar

Script API

RayCastHit

Where: Client
More page actions

For the complete documentation index, see llms.txt. This page is also available as Markdown.

Struct Namespace Sansar.Simulation

Result of a Raycast.

public struct RayCastHit

Members at a glance

KindMembers
FieldsComponentId · Fraction · Location · Normal

Fields

ComponentId

public Sansar.Script.ComponentId ComponentId

The id of the RigidBodyComponent hit.

Fraction

public float Fraction

The query shape’s position (upon contact) along the cast direction as a fraction of the original casting length.

Location

public Sansar.Vector Location

The location where the hit occurred.

Normal

public Sansar.Vector Normal

The normal at the location where the hit occurred.

Generated from the Sansar 47.10.0 client ScriptApi snapshot.