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"

Screen location to World Position help


I'm having difficulty trying to spawn actors at specific location on screen.

I'm working in 2D and I would like to spawn the actor on the left side of the screen.

I've used ConvertScreenLocationToWorldSpace and set X and Y to 0.

alt text

If I spawn the actor (blue square) at the returned location it appears in the middle rather than left of screen.

alt text

Can someone explain how I can spawn something in world space and have it aligned left,right top bottom of screen?

Product Version: UE 4.12
more ▼

asked Sep 09 '16 at 11:11 AM in Blueprint Scripting

avatar image

1 3 4 6

avatar image jawilba Sep 13 '16 at 10:04 PM

Couldn't get the ConvertScreenLocationToWorldSpace to work as I needed but then realised I didn't need to do this anyway.

I was working with orthographic camera width 500 with the camera located at 0,0,0. Because of this the left side of the screen was at -250 in Y direction.

So to get the actor (blue square in above example) to spawn on left of screen I simply needed to set location to 0,-250,0 . May need to add some offset amount if origin/pivot point is not on left of mesh.

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

0 answers: sort voted first
Be the first one to answer this question
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