SPhysicsHit

Index

Properties Index

Property

Properties

Object

SGameObject Object get

Property Description

this = Space.Host.ExecutingObject
hit = Space.Physics.RayCastSingle(this.WorldPosition,this.Forward,20)

hitGameObject = hit.Object
example 2

Position

SVector Position get

Where the physics hit occurred

this = Space.Host.ExecutingObject
hit = Space.Physics.RayCastSingle(this.WorldPosition,this.Forward,20)

hitPosition = hit.Position

Normal

SVector Normal get

The normal of the hit

this = Space.Host.ExecutingObject
hit = Space.Physics.RayCastSingle(this.WorldPosition,this.Forward,20)

hitNormal = hit.Normal

UV

SVector UV get

The UV coordinates of where the hit occurred on a mesh.

This property will currently always return [0,0] due to a current bug.

this = Space.Host.ExecutingObject
hit = Space.Physics.RayCastSingle(this.WorldPosition,this.Forward,20)

hitUV = hit.UV

UV2

SVector UV2 get

The UV2 coordinates of where the hit occurred on a mesh.

This property will currently always return [0,0] due to a current bug.

this = Space.Host.ExecutingObject
hit = Space.Physics.RayCastSingle(this.WorldPosition,this.Forward,20)

hitUV2 = hit.UV2

Distance

float Distance get

How far down a ray or from the collider, the hit occurred

this = Space.Host.ExecutingObject
hit = Space.Physics.RayCastSingle(this.WorldPosition,this.Forward,20)

hitDistance = hit.Distance

ContainsHit

bool ContainsHit get

Whether it was a hit or not

this = Space.Host.ExecutingObject
hit = Space.Physics.RayCastSingle(this.WorldPosition,this.Forward,20)

hitContainsHit = hit.ContainsHit

Last updated

Sinespace® is a registered trademark of Sine Wave Entertainment Ltd, All Rights Reserved.