aws / lumberyard

Amazon Lumberyard is a free AAA game engine deeply integrated with AWS and Twitch – with full source.
Other
2.02k stars 539 forks source link

Don't serialize PhysX collider scale values #516

Closed yuriy0 closed 3 years ago

yuriy0 commented 3 years ago

The scale values for PhysX colliders come from the entity parent transform, so when changing the scale anywhere in the parent hierarchy of a physx collider, the editor thinks thinks that the collider has changed, because this changes its serialized representation, and comparison is done based on the serialized representation.

It isn't necessary to store the scale in the serialized representation for runtime correctness, because all of the runtime colliders invariably overwrite the scale of their shapes. This is necessary for the correct instantiation of dynamic slices which might a scale override.

However instead of removing the scale from the serialized representation altogether this change simply sets the scale only when creating the collider in the PhysX world, not in the serialized representation. The serialized representation then always contains (1,1,1) as the scale.

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.

AMZN-puvvadar commented 3 years ago

Hi @yuriy0 ,

Thanks for the submission. We'll update once we've evaluated this change.

AMZN-puvvadar commented 3 years ago

Hi @yuriy0,

We acknowledge the issue this change is addressing but will be going a different route to fix it. Thanks for bringing this to our attention!