Skip to content

Disable shape scaling by default #9335

Description

@LeXXik

We have it enabled by default currently:

/**
* Whether mesh shapes honour the per-instance {@link PhysicsMeshSource} scale, so that a
* mesh shape is rebuilt when the world scale of its entity changes. Backends that cannot
* scale mesh instances independently return false, and mesh shapes are then left alone when
* their entity is rescaled.
*
* @type {boolean}
* @ignore
*/
get supportsMeshScaling() {
return true;
}

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions