ColShape Debug resource

  • For all who want to see they colshapes.


    Create2DColShape

    Create3DColShape

    CreateCylinderColShape

    CreateSphereColShape

    How to use this:

    1. Copy the ColShape.dll from folder ColShapeDebug\bin\release to your folder where gt-mp server exe is.

    2. Place the ColShapeDebug folder in your resource folder.

    3. Add in your meta from your resource with your shape <assembly ref="ColShape.dll" /> and <include resource="ColShapeDebug" />.

    4. Add this to your files where the shape create " using ColShape.server; "

    5. Create your shape API.shared.create3DColShape(new Vector3(10, 0, 70), new Vector3(15, 5, 75)); and add the Draw(); like in the example.

    XML: meta.xml
    1. <meta>
    2. <!-- Create with meta generator by SyBozz -->
    3. <info name="Example" author="SyBozz" type="script" />
    4. <!-- Include Resources -->
    5. <include resource="ColShapeDebug" />
    6. <!-- Assembly -->
    7. <assembly ref="ColShape.dll" />
    8. <!-- Server Scripts -->
    9. <script src="example.cs" type="server" lang="csharp" />
    10. </meta>


    NOTE:

    There are 4 shape types and it can only draw one for every type at the time

    this is the last shape with .Draw();

    If you have a big shape please draw only one per time.

    FPS can go down to 15 or less when your shapes to big.

    When you use .Draw(); before you join you can`t see the shape

    for that create the shape after join or restart your resource with command.


    This is only for debug and to see where you shape is.


    DOWNLOAD

    The post was edited 2 times, last by SyBozz ().

  • Amazing resource to use if you want to clearly see what's going on with your colliders. There was an issue with drawing of Rectangle2DColShape with no definition for the X, Y, Width & Height value for the collider. Had to parse them in manually after editing the source code for the .dll and afterwards recompile it. Anyway, works like a charm.

  • Update:

    -Fixed the problem with 2d colshapes

    -Changed names of classes, methodes and propertys

    -Improved performance

    -The message for entering a colshape with the vehicle is send now just once

    -Added entering message prefix [Client] and [Vehicle]


    So now the performance should be much better since the positions for the lines are just calculate once and not every frame like before.

    The post was edited 1 time, last by SyBozz ().