SPhysicsHit
ClientTypes
Membres 7
| Propriété | Object | – |
| Propriété | Position | Where the physics hit occurred |
| Propriété | Normal | The normal of the hit |
| Propriété | UV | The UV coordinates of where the hit occurred on a mesh. |
| Propriété | UV2 | The UV2 coordinates of where the hit occurred on a mesh. |
| Propriété | Distance | How far down a ray or from the collider, the hit occurred |
| Propriété | ContainsHit | Whether it was a hit or not |
Propriétés
ObjectLecture seule
Exemple
Lua
this = Space.Host.ExecutingObject
hit = Space.Physics.RayCastSingle(this.WorldPosition,this.Forward,20)
hitGameObject = hit.Object
Lua
example 2
PositionLecture seule
Where the physics hit occurred
Exemple
Lua
this = Space.Host.ExecutingObject
hit = Space.Physics.RayCastSingle(this.WorldPosition,this.Forward,20)
hitPosition = hit.Position
NormalLecture seule
The normal of the hit
Exemple
Lua
this = Space.Host.ExecutingObject
hit = Space.Physics.RayCastSingle(this.WorldPosition,this.Forward,20)
hitNormal = hit.Normal
UVLecture seule
SVector UV {get; }
The UV coordinates of where the hit occurred on a mesh.
Exemple
Lua
this = Space.Host.ExecutingObject
hit = Space.Physics.RayCastSingle(this.WorldPosition,this.Forward,20)
hitUV = hit.UV
UV2Lecture seule
SVector UV2 {get; }
The UV2 coordinates of where the hit occurred on a mesh.
Exemple
Lua
this = Space.Host.ExecutingObject
hit = Space.Physics.RayCastSingle(this.WorldPosition,this.Forward,20)
hitUV2 = hit.UV2
DistanceLecture seule
float Distance {get; }
How far down a ray or from the collider, the hit occurred
Exemple
Lua
this = Space.Host.ExecutingObject
hit = Space.Physics.RayCastSingle(this.WorldPosition,this.Forward,20)
hitDistance = hit.Distance
ContainsHitLecture seule
bool ContainsHit {get; }
Whether it was a hit or not
Exemple
Lua
this = Space.Host.ExecutingObject
hit = Space.Physics.RayCastSingle(this.WorldPosition,this.Forward,20)
hitContainsHit = hit.ContainsHit



