Jump to content

Recommended Posts

I want to draw cirlces and lines, I have this

public void Draw()
    {
        Radar3D.DrawLine(_nearestPoint, ObjectManager.Me.Position, Color.Red);

        _path.ForEach(i => Radar3D.DrawCircle(i, 2f, Color.Green));
        
        
    }

If I call it every 17ms from loop, there is nothing good in my Wow window, tell me how to use it correctly.

Link to comment
https://wrobot.eu/forums/topic/7320-radar3d-how-to-use-it/
Share on other sites

I have dabbled a little bit with it, but I was not very successful myself. Maybe you need a draw event and then pulse the radar?

Radar3D.OnDrawEvent += () =>
{
	// draw
};
Radar3D.Pulse();

I believe you want the OnDrawEvent inside the Initialize() method.

Link to comment
https://wrobot.eu/forums/topic/7320-radar3d-how-to-use-it/#findComment-33294
Share on other sites

Hello, you can subscribe your method to the event on initialize and unsubscribe on dispose:

    public void Initialize()
    {
        Radar3D.Pulse();
        Radar3D.OnDrawEvent += Radar3DOnDrawEvent;
    }
    
    public void Dispose()
    {
        Radar3D.OnDrawEvent -= Radar3DOnDrawEvent;
        Radar3D.Stop();
    }
    
    private static void Radar3DOnDrawEvent()
    {
        if (ObjectManager.Target.IsValid)
            Radar3D.DrawLine(ObjectManager.Me.Position, ObjectManager.Target.Position, Color.Chocolate);
        Radar3D.DrawCircle(ObjectManager.Me.Position, 5, Color.Chocolate);
    }

 

Link to comment
https://wrobot.eu/forums/topic/7320-radar3d-how-to-use-it/#findComment-33328
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...