Skip to main content

Ray

class Ray

Ray with distance, position and direction in the scene, similar to Laser, it is mainly used to create advanced shooting systems among other systems.


public class Ray

— Constructors (3) —

ConstructorDescription
Ray()Creates a new instance of Ray.
Ray([JAVARuntime.RayDirection] rayDirection, float distance)Creates a new instance of Ray with its direction and distance to be the arguments.
Ray(Vector3 position, Vector3 direction, float distance)Creates a new instance of Ray com with its position, direction, and distance defined to be the arguments.

— Methods (6) —

NameDescription
[JAVARuntime.RayDirection] getRayDirection()Returns the current direction of Ray.
void setRayDirection([JAVARuntime.RayDirection] rayDirection)Sets the current direction of Ray.
[JAVARuntime.PhysicsLayer] getPhysicsLayer()Returns the current physics layer of Ray.
void setPhysicsLayer([PhysicsLayer] layer)Defines the current physics layer of Ray.
float getDistance()Returns the current distance of Ray.
void setDistance(float distance)Sets the current distance of Ray.