Skip to content

CustomGravityRigidbody: Optimize for large scenes #19

@jyee27

Description

@jyee27

CustomGravity currently checks every gravity source in the scene. If we start having many distant GravitySources in one scene, this will add a lot of calculations per tick for every CustomGravityRigidbody in the scene.

Do this

  • Add a trigger volume to each GravitySource type
  • When a CustomGravityRigidbody enters the trigger, add it to a list on that CustomGravityRigidbody
  • When a CustomGravityRigidbody leaves the trigger, remove the source from the list
  • Maybe use key values to make certain sources override gravity but sources with different keys can have multiple active at the same time

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions