我正在使用three.js鸟类动画。我只想降低鸟类的飞行速度。现在我已启用所有默认设置。 (飞行单位除外。我增加到20 | var i = 0; i <20; i ++)
我找到了一个可以编辑鸟类速度的地方。 (不知道这是对的地方) [链接] [1]到该文件(行号:48)
var Boid = function() {
var vector = new THREE.Vector3(),
_acceleration, _width = 500, _height = 500, _depth = 200, _goal, _neighborhoodRadius = 100,
Here _maxSpeed = 4 Here, _maxSteerForce = 0.1, _avoidWalls = false;
this.position = new THREE.Vector3();
this.velocity = new THREE.Vector3();
_acceleration = new THREE.Vector3();
this.setGoal = function ( target ) {
_goal = target;
};
[1]:
问题
当我将_maxSpeed = 4编辑为_maxSpeed = 3时,只有一只鸟群在四处移动。(所有的鸟都会粘在一个鸡群上)或者很少只是另一只鸡群。
有什么建议吗?
https://github.com/mrdoob/three.js/blob/master/examples/canvas_geometry_birds.html