playcanvas / playcanvas/engine

Disable shape scaling by default

Open Beginner friendly
#9,335 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
16.8k
Forks
2k
Avg merge
4h 32m
Merged PRs (30d)
222

Description

We have it enabled by default currently:

https://github.com/playcanvas/engine/blob/a223a892950e557af942f409d986ddd417257e0b/src/framework/physics/physics-world.js#L184-L195

This adds an extra loop every step to check if a component's entity was scaled. Which adds an overhead for projects that did not rely on that functionality previously. I think we should probably false it by default, unless a user needs to change scales at runtime - they can then enable it for some cost. This will affect projects that use hundreds of rigibodies.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/framework/physics/physics-world.js at lines 184-195, where shape scaling is enabled by default. Confirm how the setting is exposed and how runtime scale changes are handled. Done means scaling checks are disabled by default while users can still enable the behavior when needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
game-dev, performance
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
82/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.