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
|
||||
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() {
|
||||
|
|
Loading…
Reference in a new issue