Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

Only update PhysX editor colliders if transform has actually changed #515

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yuriy0
Copy link

@yuriy0 yuriy0 commented Aug 28, 2020

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.

The update is a relatively expensive operation which adds up quickly if the transform is updated to the same value on each tick
@AMZN-puvvadar
Copy link

Hi @yuriy0 ,

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

@oyongzhi
Copy link

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!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants