Closed LXMedia1 closed 8 years ago
Cuz you try to calculate the direction with the direction you already have, this means newPos must be player.Direction.
What you want can be achieved with simply Player.Instance.Position + Player.Instance. Direction * 100
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
Gib mal bitte den return Wert von Player.Instance.Direction, ist dann bestimmt 0 und muss gefixt werden
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
Komisch, dann mach als Übergangslösung bitte Player.Instace.Direction.Perpendicular() oder Perpendicular2(), je nachdem welches passt, ich leite es trotzdem weiter
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?
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));