Skip to main content

LaserHit

class LaserHit

The LaserHit, unlike the Laser, is just the collision of the Laser, that is, the end (tip) of the Laser, it will detect if the Laser has collided with any object.


public class LaserHit

— Constructors (1) —

ConstructorDescription
LaserHit()Creates a new LaserHit.

— Methods (14) —

NameDescription
SpatialObject getObject()Returns the parent SpatialObject that the LaserHit collided with.
void setObject(SpatialObject object)Sets the parent SpatialObject that the LaserHit will collide with as the value of the "object" argument.
SpatialObject getColliderObject()Returns SpatialObject regardless of whether it is a child or parent object that LaserHit collided with.
SpatialObject setColliderObject(SpatialObject object)Defina o SpatialObject como o LaserHit colidirá independentemente se ele for um objeto filho ou pai como o valor do argumento "object".
Vector3 getPoint()Returns the index of the vertex of the SpatialObject that LaserHit collided with.
void setPoint(Vector3 point)Sets the index of the vertex of the SpatialObject which LaserHit collided with to be "point" argument.
Vector3 getNormal()Returns the normal of the SpatialObject that LaserHit collided with.
void setNormal(Vector3 normal)Sets the normal of the SpatialObject that LaserHit collided with to be "normal" argument.
Vector3 getFaceNormal()Returns the Normal face of the SpatialObject that LaserHit collided with.
void setFaceNormal(Vector3 normal)Sets the Normal face of the SpatialObject which LaserHit collided with to be "normal" argument.
Vector3 getFaceNormalLocal()Returns the Normal face of the SpatialObject which LaserHit collided with to be "normal" argument and applies it to Vector itself.
void setFaceNormalLocal(Vector3 normal)Defines the Normal face of the SpatialObject which LaserHit collided with to be "normal" argument and applies it to Vector itself.
float getDistance()Returns the LaserHit distance.
void setDistance(float distance)Sets the LaserHit distance to be "distance" argument.