Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show the 'Is Simulated' option as disabled when the collider is acting as a trigger. #14997

Merged

Conversation

moraaar
Copy link
Contributor

@moraaar moraaar commented Mar 8, 2023

What does this PR do?

Show the 'Is Simulated' option as disabled when the collider is acting as a trigger, this way it'll be clear that when the collider is a trigger it won't be simulated.

image

How was this PR tested?

Checked 'Is Simulated' appears disabled when 'Is Trigger' is enabled in Primitive, Mesh and Shape collider components.

…g as a trigger.

Signed-off-by: moraaar <moraaar@amazon.com>
Signed-off-by: moraaar <moraaar@amazon.com>
Copy link
Contributor

@hultonha hultonha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a small suggestion on the naming but otherwise LGTM 👍

Code/Framework/AzFramework/AzFramework/Physics/Shape.h Outdated Show resolved Hide resolved
@hultonha
Copy link
Contributor

hultonha commented Mar 8, 2023

Any chance you could include a screenshot in the description please @moraaar just for @o3de/sig-ui-ux to take a look at too.

Signed-off-by: moraaar <moraaar@amazon.com>
// m_dummyIsSimulated is used for EditContext only, it will always be false and read-only.
// It will be shown instead of the real m_isSimulated property when m_isTrigger is enabled,
// this way it'll be clear that when the collider is a trigger it won't be simulated.
bool m_dummyIsSimulated = false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be made const, or does that fail to work with the EditContext?

Copy link
Contributor Author

@moraaar moraaar Mar 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried that first, it does fail to compile unfortunately.

@moraaar moraaar merged commit ba8f84e into o3de:development Mar 8, 2023
3 checks passed
@moraaar moraaar deleted the DisableIsSimulatedOnTrigger branch March 8, 2023 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants