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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How can i get mouse world position if i have my camara rotate?

im trying to make a RTS and i can move my camara if the mouse is near of edge of the screen but this movement give problem and also the rotation that i have in my camara give problem

Any ideas how can i solve this? :(

Product Version: UE 4.17
Tags:
more ▼

asked Sep 29 '17 at 07:27 AM in Using UE4

avatar image

BadluckPaiton
1 1 1

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

1 answer: sort voted first

You'd have to describe the problems first. We can't read minds :(

How can i get mouse world position if i have my camara rotate?

You can project mouse coordinates into the world. Or you could pick object at cursor location (ground, let's say), this will give you world location of where you clicked.

But you'll need to be more descriptive first.

more ▼

answered Sep 29 '17 at 09:24 AM

avatar image

Everynone
14.6k 76 25 61

avatar image BadluckPaiton Sep 29 '17 at 07:18 PM

Sorry about my description

Well my problem is when i use ConverMouseLocationToWorld this give me wrong coordenates and im thinking is a problem because i have my camera rotate because i want a isometric view in the game,

i dont know if i describe well my problem

[1]: /storage/temp/215192-camera.png

camera.png (717.7 kB)
avatar image Everynone Sep 29 '17 at 09:02 PM

Have you tried this:

alt text

I still do not know what you are trying to do? Click on the ground, click on a unit? Your are converting mouse location, are you trying to place something in the world using UI?

capture.png (120.2 kB)
avatar image BadluckPaiton Sep 29 '17 at 11:24 PM

Woooo that works !

Im trying to select a unit

But i think my first step is to know my mouse click location in the world, later see if there is an object in that position

or there is another way to do it?

avatar image Everynone Sep 30 '17 at 10:43 AM

Give your actors tags, FriendlyUnit, EnemyUnit, FriendlyBuilding, Ground and so on, at the very bottom:

alt text

When you HitBreakResult, pull a wire from HitActor (this is the actor that you clicked, either the ground mesh or the unit) and search for ActorHasTag. Compare it to tags you created and you can branch the execution this way.

Something like this:

alt text

capture.png (247.5 kB)
hastags.png (18.1 kB)
(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