Skip to content

Commit

Permalink
Dropped number of chairs in the Compound Collision example (#5149)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Valigursky <mvaligursky@snapchat.com>
  • Loading branch information
mvaligursky and Martin Valigursky committed Mar 13, 2023
1 parent b334160 commit e85ca41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/src/examples/physics/compound-collision.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ class CompoundCollisionExample {
function spawnChair() {
const chair: pc.Entity = app.root.findByName('Chair') as pc.Entity;
const clone = chair.clone();
clone.setLocalPosition(Math.random() * 5 - 2.5, Math.random() * 2 + 1, Math.random() * 5 - 2.5);
clone.setLocalPosition(Math.random() * 1 - 0.5, Math.random() * 2 + 1, Math.random() * 1 - 0.5);
app.root.addChild(clone);
numChairs++;
}
Expand All @@ -346,7 +346,7 @@ class CompoundCollisionExample {
app.on("update", function (dt) {
// Add a new chair every 250 ms
time += dt;
if (time > 0.25 && numChairs < 100) {
if (time > 0.25 && numChairs < 20) {
spawnChair();
time = 0;
}
Expand Down

0 comments on commit e85ca41

Please sign in to comment.