fix boids escaping edge wrappinig using Centering Velocity to force return to Rectangle, move velocity limiting logic into Util, abs vector function

This commit is contained in:
Xevion
2020-05-17 13:05:24 -05:00
parent 44fb0f3bfe
commit b6812cc9a8
5 changed files with 388 additions and 29 deletions

View File

@@ -173,7 +173,7 @@ Camera:
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 22.68
orthographic size: 25
m_Depth: -1
m_CullingMask:
serializedVersion: 2
@@ -232,17 +232,18 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7d72224fef7a4fb4a998b0980fe0eb77, type: 3}
m_Name:
m_EditorClassIdentifier:
boidCount: 208
boidGroupRange: 5
boidCount: 100
boidGroupRange: 3.6
boidStartVelocity: 0.05
boidVelocityLimit: 0.8
separationRange: 2.3
boidVelocityLimit: 0.3
separationRange: 2.8
separationBias: 0.01
alignmentBias: 0.01
cohesionBias: 0.01
alignmentBias: 0.05
cohesionBias: 0.05
localFlocks: 1
boidObject: {fileID: 1737515784064720040, guid: 23e1eaaf69d4ef342ac3ef9590f6c642,
type: 3}
boids: []
cam: {fileID: 519420031}
--- !u!4 &1321165554
Transform:
m_ObjectHideFlags: 0