How can I get that point? It seems that everything that is done is in absolute values. It doesn't matter the distance that the point is from the unit, but It needs to be in the direction that the unit is facing. Is there a way to do this or am I screwed?
(BTW this is to turn a unit towards the mouse over a certain period of time based on the angle, if you know a better way, please feel free to share!)
Couldn't you just use make unit face point and order it to turn toward the clicked point over x seconds? You can get the clicked point using "point from xy" and plugging in the mouse coordinates.
edit- Reread the post...Are you trying to change the total turn time based on the angle?
That's a better way of doing it. A polar offset is a directional offset towards a given angle. In this case, a certain distance away from your unit in the angle it's facing. Try something like this:
BasePoint: Position of your Unit
ClickedPoint: Position of the mouse click
Distance: Distance between BasePoint & ClickedPoint
GoalPoint: BasePoint with polar offset(direction is the facing of unit, distance is your distance variable from above)
Rollback Post to RevisionRollBack
Feel free to Send me a PM if you have any questions/concerns!
Thank you, polar offset seems to be exactly what I am looking for.
As for your first question, I'm using this to get (x) seconds to turn over. That way it doesn't take 1 second to turn 2 degrees and 1 second to do a complete 180.
How can I get that point? It seems that everything that is done is in absolute values. It doesn't matter the distance that the point is from the unit, but It needs to be in the direction that the unit is facing. Is there a way to do this or am I screwed?
(BTW this is to turn a unit towards the mouse over a certain period of time based on the angle, if you know a better way, please feel free to share!)
Any and All help is appreciated, -AnOddRadishCouldn't you just use make unit face point and order it to turn toward the clicked point over x seconds? You can get the clicked point using "point from xy" and plugging in the mouse coordinates.
edit- Reread the post...Are you trying to change the total turn time based on the angle?
I'm not sure if I understand this correctly, but all you need is a point that has an offset into the direction that the unit is facing?
If thats correct then just use the "Point with Polar Offset" method and for angle use the "Facing Angle of Unit" method.
@Bommes: Go
That's a better way of doing it. A polar offset is a directional offset towards a given angle. In this case, a certain distance away from your unit in the angle it's facing. Try something like this:
Thank you, polar offset seems to be exactly what I am looking for.
As for your first question, I'm using this to get (x) seconds to turn over. That way it doesn't take 1 second to turn 2 degrees and 1 second to do a complete 180.
-Edit - *Squee* 100 posts!