Перейти к содержанию

IsPointWithinColshape

Материал из RAGE MP Wiki Archive

Checks whether a point is into the given colshape.


<syntaxhighlight lang="csharp">ColShape NAPI.ColShape.IsPointWithinColshape(ColShape colShape, Vector3 point);</syntaxhighlight>

Parameters

  • colShape: parameter input should be in ColShape type
  • point: parameter input should be in Vector3 type


Example

<syntaxhighlight lang="csharp"> [Command("incolshape")] public void InColshapeCommand(Client player) {

   ColShape cylinder = NAPI.ColShape.CreateCylinderColShape(new Vector3(), 10.0f, 5.0f);
   bool pointInside = NAPI.ColShape.IsPointWithinColshape(cylinder, player.Position);

} </syntaxhighlight>