EloBuddy / EloBuddy.Issues

Issue Tracker for
http://EloBuddy.net
0 stars 2 forks source link

Extend issues #62

Closed ghost closed 8 years ago

ghost commented 8 years ago

I can't get a stable text draw with extend, if it stayed Vector3 until the end it would be nice because I could WorldToScreen() then and it would be more accurate.

Example code:

Drawing.DrawCircle(hero.ServerPosition, spells.Q.Range, System.Drawing.Color.White);
                Drawing.DrawText(hero.Position.WorldToScreen().Extend(Game.CursorPos2D, spells.Q.Range), System.Drawing.Color.White,"Q",12);

What I expect: Q to rotate around the circle in the direction of my cursor. (the Q always touching the circle). Result: http://i.imgur.com/Od4AssG.gifv

ghost commented 8 years ago

This seems to be similar to #9

KarmaPanda commented 8 years ago

Can confirm.

Hellsing commented 8 years ago

This is your fault as you first draw a 3D world circle and want to draw on it with 2D screen vectors, you simply need to extend the position vector first and then use WorldToScreen on it

ghost commented 8 years ago

I think you misunderstand. The instructions you just gave me are impossible (and what I want to do!), you cannot use WorldToScreen on a Vector2. Extend takes a vector3 and returns a vector2. WorldToScreen requires a vector3.

Hellsing commented 8 years ago

And for the Extend method, it returns X and Y values based on the input, so if you need to have a 3D vector, simply convert it for your needs, either use .To3D([height]) or .To3DWorld() for the world height at that position

ghost commented 8 years ago

This feels really hacky but it works, thank you.