x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Mouse down location for viewport context menu?

Hey guys, is there a way to grab the mouse down location for the current context menu being built in the editor's viewport? I found myself needing to do a custom pick into the world for the context menu I'm building up and would love to know the 2D viewport location as well as the camera where the user picked to spawn the context menu.

Product Version: Not Selected
Tags:
more ▼

asked Mar 11 '14 at 02:59 AM in Using UE4

avatar image

ue4-archive ♦♦ STAFF
49.9k 3662 1988 9113

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

You should be able to use GEditor->ClickLocation and GEditor->ClickPlane to get the 3D position and normal that was clicked. However, we don't yet expose the 2D click position. Can you give an example of what that would be used for so we can figure out the right API for it?

more ▼

answered Mar 11 '14 at 02:59 AM

avatar image

ue4-archive ♦♦ STAFF
49.9k 3662 1988 9113

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:59 AM

Oh perfect, I wanted the 2D position to do the pick myself. Those give me what I need. The only other additional thing I was going to try and get with the pick is the actual Actor you clicked on. Right now I infer it from the first selected actor.

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:59 AM

Oh and the example use of it was for my plugin in Part 2 of the building a plugin saga. Long story short, when simulating fake damage, I want to be able to provide directionality of the damage and hit location based upon where the user clicked.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question