EloBuddy / EloBuddy.Issues

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

ObjectManager.Player.Direction wrong values #66

Closed LXMedia1 closed 8 years ago

LXMedia1 commented 8 years ago

Seems it not returns the Correct facing direction

var newpos = ObjectManager.Player.Direction - ObjectManager.Player.Position; newpos.Normalize(); Circle.Draw(Color.White, 50, ObjectManager.Player.Position + (newpos * 100));

Hellsing commented 8 years ago

Cuz you try to calculate the direction with the direction you already have, this means newPos must be player.Direction.

Hellsing commented 8 years ago

What you want can be achieved with simply Player.Instance.Position + Player.Instance. Direction * 100

LXMedia1 commented 8 years ago

Ok hattest recht, hab hier ne verkürzte version geschrieben und nen kleinen fehler eingebaut.

Aber die werte sind trotzdem irgendwie falsch :dancers:

also ich nehm mal deines

Circle.Draw(Color.White, 50, Player.Instance.Position + Player.Instance.Direction * 100);

dann wird mir die directed Rechts neben der tatsächlichen direction angezeigt

http://puu.sh/nqTSE/52c2ce277c.jpg

Hellsing commented 8 years ago

Gib mal bitte den return Wert von Player.Instance.Direction, ist dann bestimmt 0 und muss gefixt werden

LXMedia1 commented 8 years ago

x und y passen ja im Prinzip, also es dreht sich ja auch schön mit, nur is es nicht Vorne sondern 90° nach rechts http://puu.sh/nqUdc/3c64398101.png

Hellsing commented 8 years ago

Komisch, dann mach als Übergangslösung bitte Player.Instace.Direction.Perpendicular() oder Perpendicular2(), je nachdem welches passt, ich leite es trotzdem weiter

LXMedia1 commented 8 years ago

Circle.Draw(Color.White, 50, Player.Instance.Position + Player.Instance.Direction.To2D().Perpendicular().To3D() * 100); jop nu ists vorne :D auch wenns bissl komisch aussieht :D danke

ps: mein english is kacke damit nich wieder missverständnisse auftauchen werd ich ab sofort nur noch deutsch reporten ok?