lumberyard icon indicating copy to clipboard operation
lumberyard copied to clipboard

Only update PhysX editor colliders if transform has actually changed

Open yuriy0 opened this issue 4 years ago • 2 comments

In the editor, PhysX colliders cannot be moved and are instead destroyed and re-created in the physical world every time the transform changes. This update is a relatively expensive operation which adds up quickly if the transform is updated very frequently e.g. every tick, and you have many colliders in your level.

This change adds a check in OnTransformChanged to see if the transform is actually different.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

yuriy0 avatar Aug 28 '20 21:08 yuriy0

Hi @yuriy0 ,

Thanks for submitting this optimization, we'll evaluate it and update when complete.

AMZN-puvvadar avatar Sep 04 '20 22:09 AMZN-puvvadar

Hello yuriy0! We've reviewed your pull request and wanted to let you know we will be incorporating your proposed changes into our next version of the Lumberyard engine. Thank you kindly for contributing to Lumberyard!

oyongzhi avatar Dec 11 '20 21:12 oyongzhi