ClickWithRaycast

From RAGE Multiplayer Wiki
Revision as of 14:03, 24 May 2019 by RoboN1X (talk | contribs) (category)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Event

 C#




C# Syntax

public delegate void OnClickWithRaycastDelegate(int x, int y, bool up, bool right, float relativeX, float relativeY, Vector3 worldPos, int entityHandle);

Parameters

  • x - expects System.Int32
  • y - expects System.Int32
  • up - expects System.Boolean
  • right - expects System.Boolean
  • relativeX - expects System.Single
  • relativeY - expects System.Single
  • worldPos - the position in the world, expects RAGE.Vector3
  • entityHandle - the handle of the entity, expects System.Int32

Example

The example below does nothing on invoke of event

Events.OnClickWithRaycast += OnClickWithRaycast;
public void OnClickWithRaycast(int x, int y, bool up, bool right, float relativeX, float relativeY, RAGE.Vector3 worldPos, int entityHandle)
{
    //add something beast here
}