Laser
Complete API reference for Laser, including constructors, attributes, virtual attributes, and methods.
Package: JAVARuntime
Category: Laser
Component: no
public class Laser
Constructors
| Signature | Description |
|---|---|
Laser(Raycast) | Executes Laser and returns after the underlying engine call finishes. |
Laser() | Creates a new instance of Laser. |
Laser(Color) | Creates a new instance of Laser. |
Attributes
| Name | Type | Description |
|---|---|---|
raycast | Raycast | Represents the raycast value stored on this instance. Read or assign to update the property. |
Virtual Attributes
| Name | Type | Access | Description |
|---|---|---|---|
calculateFaceUV | boolean | get/set | Returns whether the laser should try to calculate the UV of the face at the hit point. |
color | Color | get/set | Returns the color shown in the editor when the Laser hits something. |
determineHitCollider | boolean | get/set | Returns whether the laser should try to find out which child collider was hit. |
noHitColor | Color | get/set | Returns the color shown in the editor when the Laser hits nothing. |
showGizmo | boolean | get/set | Returns whether the gizmo (laser visualization) is shown in the editor. |
Methods
| Signature | Returns | Description |
|---|---|---|
trace(JAVARuntime.Ray) | LaserHit | Traces a laser using the specified Ray. |
trace(Vector3, Vector3) | LaserHit | Traces a laser from a specified position and direction. |
trace(Vector3, Vector3, float) | LaserHit | Traces a laser from a specified position and direction, with a defined maximum distance. |
trace(Vector3, Vector3, float, PhysicsLayer) | LaserHit | Traces a laser from a specified position, direction, and distance with the indicated PhysicsLayer. |
trace(Vector3, Vector3, PhysicsLayer) | LaserHit | Traces a laser from a specified position and direction, in the indicated PhysicsLayer. |
traceAll(JAVARuntime.Ray) | List<LaserHit> | Traces a laser using the specified Ray and return all collisions. |
traceAll(Vector3, Vector3) | List<LaserHit> | Traces a laser from a specified position and direction and return all collisions. |
traceAll(Vector3, Vector3, float) | List<LaserHit> | Traces a laser from a specified position and direction, with a defined maximum distance and return all collisions. |
traceAll(Vector3, Vector3, float, PhysicsLayer) | List<LaserHit> | Traces a laser from a specified position, direction, and distance with the indicated PhysicsLayer and return all collisions. |
traceAll(Vector3, Vector3, PhysicsLayer) | List<LaserHit> | Traces a laser from a specified position and direction, in the indicated PhysicsLayer and return all collisions. |
traceSphere(JAVARuntime.Ray, float) | LaserHit | Traces a sphere sweep test laser using the specified Ray. |
traceSphere(Vector3, Vector3, float) | LaserHit | Traces a sphere sweep test laser from a specified position and direction. |
traceSphere(Vector3, Vector3, float, float) | LaserHit | Traces a sphere sweep test laser from a specified position and direction, with a defined maximum distance. |
traceSphere(Vector3, Vector3, float, PhysicsLayer, float) | LaserHit | Traces a sphere sweep test laser from a specified position, direction, and distance with the indicated PhysicsLayer. |
traceSphere(Vector3, Vector3, PhysicsLayer, float) | LaserHit | Traces a sphere sweep test laser from a specified position and direction, in the indicated PhysicsLayer. |
traceSphereAll(JAVARuntime.Ray, float) | List<LaserHit> | Traces a sphere sweep test laser using the specified Ray and return all collisions. |
traceSphereAll(Vector3, Vector3, float) | List<LaserHit> | Traces a sphere sweep test laser from a specified position and direction and return all collisions. |
traceSphereAll(Vector3, Vector3, float, float) | List<LaserHit> | Traces a sphere sweep test laser from a specified position and direction, with a defined maximum distance and return all collisions. |
traceSphereAll(Vector3, Vector3, float, PhysicsLayer, float) | List<LaserHit> | Traces a sphere sweep test laser from a specified position, direction, and distance with the indicated PhysicsLayer and return all collisions. |
traceSphereAll(Vector3, Vector3, PhysicsLayer, float) | List<LaserHit> | Traces a sphere sweep test laser from a specified position and direction, in the indicated PhysicsLayer and return all collisions. |