SPhysicsHit
Index
Properties Index
| Property |
|---|
SGameObject Object get |
SVector Position get |
SVector Normal get |
SVector UV get |
SVector UV2 get |
float Distance get |
bool ContainsHit get |
Properties
Object
SGameObject Object get
Property Description
- Lua
this = Space.Host.ExecutingObject
hit = Space.Physics.RayCastSingle(this.WorldPosition,this.Forward,20)
hitGameObject = hit.Object
- Lua
example 2
Position
SVector Position get
Where the physics hit occurred
- Lua
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
- Lua
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.
danger
This property will currently always return [0,0] due to a current bug.
- Lua
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.
danger
This property will currently always return [0,0] due to a current bug.
- Lua
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
- Lua
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
- Lua
this = Space.Host.ExecutingObject
hit = Space.Physics.RayCastSingle(this.WorldPosition,this.Forward,20)
hitContainsHit = hit.ContainsHit