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

IsPointWithinColshape

Материал из RAGE MP Wiki Archive
Версия от 18:26, 28 ноября 2019; imported>Xabi (Created page with "Checks whether a point is into the given colshape. {{CSharpContainer| {{#tag:syntaxhighlight|ColShape {{Template:CSharp_Serverside_namespace}}ColShape.IsPointWithinColshape(...")
(разн.) ← Предыдущая версия | Текущая версия (разн.) | Следующая версия → (разн.)

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>