Expose NavAgent turn speed to the UI

This commit is contained in:
Moritz Brückner 2020-02-22 23:08:33 +01:00
parent feab37b456
commit c60f41186d

View file

@ -9,6 +9,8 @@ class NavAgent extends Trait {
@prop
var speed: Float = 5;
@prop
var turnSpeed: 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: turnSpeed});
}
function update() {