Merge pull request #1585 from MoritzBrueckner/navmesh
Expose NavAgent turn speed to the UI
This commit is contained in:
commit
b3491dd462
|
@ -9,6 +9,8 @@ class NavAgent extends Trait {
|
|||
|
||||
@prop
|
||||
var speed: Float = 5;
|
||||
@prop
|
||||
var turnDuration: Float = 0.4;
|
||||
|
||||
var path: Array<Vec4> = null;
|
||||
var index = 0;
|
||||
|
@ -64,7 +66,7 @@ class NavAgent extends Trait {
|
|||
}});
|
||||
|
||||
var q = new Quat();
|
||||
rotAnim = Tween.to({ target: object.transform, props: { rot: q.fromEuler(0, 0, targetAngle) }, duration: 0.4});
|
||||
rotAnim = Tween.to({ target: object.transform, props: { rot: q.fromEuler(0, 0, targetAngle) }, duration: turnDuration});
|
||||
}
|
||||
|
||||
function update() {
|
||||
|
|
Loading…
Reference in a new issue