IN THIS ARTICLE
Non-uniform Scale Component
The Non-uniform Scale component allows entities to be scaled by different amounts along each local axis. It can be added by clicking the Add non-uniform scale button on the Transform component.
The Non-uniform Scale component is incompatible with certain other components which cannot be non-uniformly scaled without fundamentally changing their character. For example, it is incompatible with Sphere Shape component because non-uniformly scaling a sphere would result in an ellipsoid and break the characteristic symmetry of the sphere.
To avoid problems with skew, non-uniform scale is only applied to the current entity and does not propagate to its children.
The following components are compatible with Non-uniform Scale:
- Box Shape
- Polygon Prism Shape
- Quad Shape
- PhysX Collider - Note that primitive colliders are replaced with convex approximations if they are non-uniformly scaled, which may slightly deteriorate performance. The level of detail of the convex approximation can be adjusted using the Subdivision level setting on the PhysX Collider component.
- PhysX Shape Collider
- PhysX Rigid Body
- PhysX Force Region
The following components are incompatible with the Non-uniform Scale component because non-uniform scaling would break fundamental assumptions made by the components or because they would require major work to properly support non-uniform scale:
- Capsule Shape
- Compound Shape
- Cylinder Shape
- Disk Shape
- Sphere Shape
- Tube Shape
- PhysX Ball Joint
- PhysX Fixed Joint
- PhysX Hinge Joint
- PhysX Ragdoll
- PhysX Character Controller
- PhysX Character Gameplay
- Blast Family
- Blast Family Mesh Data
- Simple Motion
- Fly Camera Input
- HDRi Skybox
- Physical Sky
The following components are currently incompatible because they are not yet supported, but do not have fundamental reasons making compatibility difficult to add:
NonUniformScaleRequestBus is the request bus for the Non-uniform Scale component.
For more information about using the event bus (EBus) interface, see Working with the Event Bus (EBus) system .
Use the following request functions with the EBus interface to communicate with other components.
Returns the entity’s non-uniform scale.
Return Entity’s non-uniform scale value. Type: Vector3
Sets the entity’s non-uniform scale.
Parameters New non-uniform scale value. Type: Vector3
Registers a handler for the AZ::Event raised when the entity’s non-uniform scale is changed.
Parameters Handler for non-uniform scale change events. Type: NonUniformScaleChangedEvent::Handler
The component type id for the editor Non-uniform Scale component can be accessed for editor automation using the following.
For example, a Non-uniform Scale component can be added and the scale modified as follows.
nonUniformScaleComponentId = azlmbr.editor.EditorNonUniformScaleComponentTypeId azlmbr.editor.EditorComponentAPIBus(azlmbr.bus.Broadcast,'AddComponentsOfType', entityId, [nonUniformScaleComponentId]) azlmbr.entity.NonUniformScaleRequestBus(azlmbr.bus.Event, 'SetScale', entityId, azlmbr.math.Vector3(1.0, 2.0, 3.0))
Copyright © 2022 Open 3D Engine Contributors
Documentation Distributed under CC BY 4.0.
The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our Trademark Policy page.