Class PlayerGameObjectHitEvent

java.lang.Object
net.risingworld.api.events.Event
net.risingworld.api.events.player.PlayerEvent
net.risingworld.api.events.player.PlayerGameObjectHitEvent

public final class PlayerGameObjectHitEvent extends PlayerEvent
Called when a player hits a game object.
  • Method Details

    • getGameObject

      public GameObject getGameObject()
      Gets the game object that was hit by the player.
      Returns:
      the game object.
    • getHitPosition

      public Vector3f getHitPosition()
      Gets the coordinates where the element was hit exactly.
      Returns:
      world coordinates where the element was hit.
    • getHitNormal

      public Vector3f getHitNormal()
      Gets the normal, i.e the normal of the surface that was hit (the direction in which the surface points).
      Returns:
      the collision normal as a normalized Vector3f.