mirror of
https://github.com/Xevion/Boids.git
synced 2025-12-05 23:14:21 -06:00
tweaked algorithm values, fixed centering velocity breaking wrapping erratically due to improperly scaled velocities
This commit is contained in:
@@ -1252,25 +1252,27 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 7d72224fef7a4fb4a998b0980fe0eb77, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
boidCount: 153
|
||||
boidGroupRange: 2.69
|
||||
boidStartVelocity: 0.05
|
||||
boidVelocityLimit: 0.3
|
||||
boidCount: 205
|
||||
boidGroupRange: 5.9
|
||||
boidStartVelocity: 9.7
|
||||
minSpeed: 13.3
|
||||
maxSpeed: 17.2
|
||||
globalBias: 1
|
||||
separationBias: 0.014
|
||||
alignmentBias: 0.194
|
||||
cohesionBias: 0.05
|
||||
boundaryBias: 0.063
|
||||
separationBias: 1.5
|
||||
alignmentBias: 0.599
|
||||
cohesionBias: 0.558
|
||||
boundaryBias: 1.085
|
||||
enableSeparation: 1
|
||||
enableAlignment: 1
|
||||
enableCohesion: 1
|
||||
enableBoundary: 1
|
||||
boidSeparationRange: 5
|
||||
boidSeparationRange: 1.67
|
||||
boundaryForce: 0.352
|
||||
localFlocks: 1
|
||||
edgeWrapping: 1
|
||||
circleVertexCount: 360
|
||||
circleWidth: 0.1
|
||||
maxSteerForce: 100
|
||||
focusedBoid: {fileID: 0}
|
||||
boidObject: {fileID: 1737515784064720040, guid: 23e1eaaf69d4ef342ac3ef9590f6c642,
|
||||
type: 3}
|
||||
@@ -4121,7 +4123,7 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1165952970}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -2.3479285, y: -7.3538084, z: -1779.8757}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
|
||||
@@ -34,7 +34,7 @@ public class Boid : MonoBehaviour {
|
||||
// Skip Flock Calculations if wrapping in progress
|
||||
if (_isWrappingX || _isWrappingY) {
|
||||
UpdateCenteringVelocity();
|
||||
_position += _centeringVelocity;
|
||||
_position += _centeringVelocity * Time.deltaTime;
|
||||
transform.position = _position;
|
||||
}
|
||||
else {
|
||||
@@ -63,7 +63,7 @@ public class Boid : MonoBehaviour {
|
||||
_velocity = dir * speed;
|
||||
|
||||
_position += _velocity * Time.deltaTime;
|
||||
transform.position = new Vector3(_position.x, _position.y, 0);
|
||||
transform.position = _position;
|
||||
// transform.forward = dir;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user