How to draw in a plugin

Post Reply
User avatar
uslucifer1
Contributor
Contributor
Posts: 162
Joined: Tue Sep 08, 2015 1:05 am

How to draw in a plugin

Post by uslucifer1 » Sat Oct 28, 2017 7:14 pm

Image
How to draw in a plugin sphere, line, poligone, draw string ?
please give an example!
Thank you :)
I translate from Russian using google. sory :wub:
Делаем любимую игру под себя вместе с ASTRAL

User avatar
Jarod46
Administrator
Administrator
Posts: 1863
Joined: Fri Aug 13, 2010 12:31 pm

Re: How to draw in a plugin

Post by Jarod46 » Sat Oct 28, 2017 7:34 pm

MyNW.Internals.WorldDrawing.Before3DDraw

Example :

Code: Select all

MyNW.Internals.WorldDrawing.Before3DDraw += sample;

internal static void sample(object sender, MyNW.Internals.WorldDrawing.On3DDraw e)
{
            
    if (!MyNW.Internals.EntityManager.LocalPlayer.IsValid || MyNW.Internals.EntityManager.LocalPlayer.IsLoading)
        return;

    // draw sphere in player feet
    var sphere = new MyNW.Classes.Geometry.Sphere();
    sphere.Location = MyNW.Internals.EntityManager.LocalPlayer.Location;
    sphere.Color = System.Drawing.Color.Red;
    sphere.Radius = 5;

    e.Spheres.Add(sphere);

}
Only account support via private messages
Low English level, sorry

User avatar
uslucifer1
Contributor
Contributor
Posts: 162
Joined: Tue Sep 08, 2015 1:05 am

Re: How to draw in a plugin

Post by uslucifer1 » Sat Oct 28, 2017 7:46 pm

many thanks!
I translate from Russian using google. sory :wub:
Делаем любимую игру под себя вместе с ASTRAL

Barryjew
Junior Botter
Junior Botter
Posts: 4
Joined: Sat Jun 29, 2019 11:23 pm
Location: United Kingdom
Contact:

How to draw in a plugin

Post by Barryjew » Mon Jul 08, 2019 2:11 pm

How do i implement Editor Plugin with forgejs to add new hotspot dynamically in scene.
I need a example how to implement it

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests