change: SetNewRotation now takes in Vector3s instead
This commit is contained in:
@@ -29,9 +29,9 @@ namespace Reset.Units {
|
||||
//EndAction can be called from anywhere.
|
||||
protected override void OnExecute() {
|
||||
if (relativeToIsDirection.value) {
|
||||
agent.SetNewRotation(Quaternion.Euler(newRotation.value), relativity.value, absolute.value, Quaternion.Euler(relativeTo.value));
|
||||
agent.SetNewRotation(newRotation.value, relativity.value, absolute.value, relativeTo.value);
|
||||
} else {
|
||||
agent.SetNewRotation(Quaternion.Euler(newRotation.value), relativity.value, absolute.value, Quaternion.LookRotation(relativeTo.value));
|
||||
agent.SetNewRotation(newRotation.value, relativity.value, absolute.value, relativeTo.value);
|
||||
}
|
||||
EndAction(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user