maint: various clean up, movement tweaks, and smoothing fixes
This commit is contained in:
@@ -29,11 +29,14 @@ namespace Reset.Units {
|
||||
//This is called once each time the task is enabled.
|
||||
//Call EndAction() to mark the action as finished, either in success or failure.
|
||||
//EndAction can be called from anywhere.
|
||||
protected override void OnExecute() {
|
||||
agent.SetNewDirection(newDirection.value, relativity.value, absolute.value, relativeTo.value.ToVector2());
|
||||
protected override void OnExecute(){
|
||||
// Vector2 outputDir = agent.transform.InverseTransformDirection(newDirection.value).ToVector2();
|
||||
// outputDir = newDirection.value;
|
||||
|
||||
agent.SetNewDirection(newDirection.value.normalized, relativity.value, absolute.value, relativeTo.value.ToVector2());
|
||||
|
||||
if (setRawAsWell.value) {
|
||||
agent.SetNewRawDirection(newDirection.value, relativity.value, absolute.value, relativeTo.value.ToVector2());
|
||||
agent.SetNewRawDirection(newDirection.value.normalized, relativity.value, absolute.value, relativeTo.value.ToVector2());
|
||||
}
|
||||
|
||||
EndAction(true);
|
||||
|
||||
Reference in New Issue
Block a user