Expose NavAgent turn speed to the UI
This commit is contained in:
parent
feab37b456
commit
c60f41186d
|
@ -9,6 +9,8 @@ class NavAgent extends Trait {
|
||||||
|
|
||||||
@prop
|
@prop
|
||||||
var speed: Float = 5;
|
var speed: Float = 5;
|
||||||
|
@prop
|
||||||
|
var turnSpeed: Float = 0.4;
|
||||||
|
|
||||||
var path: Array<Vec4> = null;
|
var path: Array<Vec4> = null;
|
||||||
var index = 0;
|
var index = 0;
|
||||||
|
@ -64,7 +66,7 @@ class NavAgent extends Trait {
|
||||||
}});
|
}});
|
||||||
|
|
||||||
var q = new Quat();
|
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: turnSpeed});
|
||||||
}
|
}
|
||||||
|
|
||||||
function update() {
|
function update() {
|
||||||
|
|
Loading…
Reference in a new issue