-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Allow for Entity creation and Prefab instantiation in place via viewport interactions. #17768
Open
AMZN-daimini
wants to merge
7
commits into
o3de:development
Choose a base branch
from
aws-lumberyard-dev:daimini/ActionManager/GetContextMenuPosition
base: development
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Allow for Entity creation and Prefab instantiation in place via viewport interactions. #17768
AMZN-daimini
wants to merge
7
commits into
o3de:development
from
aws-lumberyard-dev:daimini/ActionManager/GetContextMenuPosition
+169
−26
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ggered, which can be used by actions to retrieve the click position at the time of user interaction for their purposes. Signed-off-by: Danilo Aimini <[email protected]>
…ck/cursor position of the interaction that started an action. Signed-off-by: Danilo Aimini <[email protected]>
… to take the interaction point into account and create/spawn at position if needed. Signed-off-by: Danilo Aimini <[email protected]>
pollend
approved these changes
Apr 18, 2024
spham-amzn
reviewed
Apr 18, 2024
forkercat
approved these changes
Apr 18, 2024
spham-amzn
reviewed
Apr 18, 2024
Code/Framework/AzToolsFramework/AzToolsFramework/ActionManager/Menu/MenuManager.cpp
Outdated
Show resolved
Hide resolved
spham-amzn
reviewed
Apr 18, 2024
Code/Framework/AzToolsFramework/AzToolsFramework/ActionManager/Menu/MenuManager.cpp
Outdated
Show resolved
Hide resolved
spham-amzn
reviewed
Apr 18, 2024
Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp
Outdated
Show resolved
Hide resolved
spham-amzn
approved these changes
Apr 18, 2024
Signed-off-by: Danilo Aimini <[email protected]>
…ni/ActionManager/GetContextMenuPosition Signed-off-by: Danilo Aimini <[email protected]>
nick-l-o3de
approved these changes
Apr 23, 2024
…ni/ActionManager/GetContextMenuPosition Signed-off-by: Danilo Aimini <[email protected]>
byrcolin
added
the
sig/content
Categorizes an issue or PR as relevant to SIG Content.
label
Apr 23, 2024
Can't seem to pass AR with this. Getting a python test failures that looks unrelated:
|
You'll need to re-merge development into this branch again to fix this |
…ni/ActionManager/GetContextMenuPosition Signed-off-by: Danilo Aimini <[email protected]>
nick-l-o3de
approved these changes
May 3, 2024
pollend
approved these changes
May 18, 2024
there were some flaky tests around this time, I recommend rebasing on latest, and then letting us know so we can trigger a build. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Introduces the necessary functions to retrieve the position of context menus and/or mouse cursor when interacting with the Editor through Action Manager menus/hotkeys.
Behavior
When triggering entity creation from right-clicking on the viewport, the position of the click that triggered the menu is now used to detect what the position of the new entity should be via raycast.
Prefab instantiation now follows the same exact behavior.
In both cases, if the context menu is triggered on the Outliner, the entity is created at 0,0,0 relative to the parent.
If the action uses a shortcut (for example,
Ctrl+Alt+N
to create a new entity), then the position of the cursor at the time the shortcut is triggered is used in the same way.The raycast should work with all geometry al place the new entity/prefab instance at the position even when it is not a flat surface.
How was this PR tested?
Manual testing.