Skip to content

Commit

Permalink
Fix boids example
Browse files Browse the repository at this point in the history
[CI BUILD]
  • Loading branch information
andybak committed Jul 5, 2023
1 parent dd27a47 commit 2e9abfa
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -38,7 +38,7 @@ function Boid:update(dt, boids)
-- Apply the attraction to origin force
self.velocity = self.velocity:Add(attractionToOrigin:Multiply(originForce))

self.velocity = Vector3.ClampMagnitude(self.velocity, 5)
self.velocity = self.velocity:ClampMagnitude(5)
self.position = self.position:Add(self.velocity:Multiply(dt))
self.orientation = Rotation.lookRotation(self.velocity, Vector3.up)
end
Expand Down

0 comments on commit 2e9abfa

Please sign in to comment.