Mouse events at long distances

I use GetHitResultUnderCursorByChannel for initiation of a hook from my character.
When I try to get hit result from sprites that have more than 100000 units in Z axis, I can not receive the location data I need.
Is there a way to change that limitation in anyway? Because I am not capable of writing my own trace function.
Similar topic: [4.7] Mouse events broken at large distances

In the Player Controller:

image


Because I am not capable of writing my own trace function.

Hi, thanks for the answer. I have changed values and changed the trace channel as shown but still mouse event does not occur after 100.000 units. What else we can do?

What distance are you trying to achieve? The number you’ve entered makes no sense. You ccould try 2-3 million uus. Above that you’ll start running into floating point errors.

What distance I try to achieve:
above 100000 units as I said before :slight_smile:
The number I have entered makes no sense:
It is bigger then 100000 units right?
You could try 2-3 millions etc :
Tried with many values but except the max allowed trace value, mouse events are the same. No such thing like floating point whatever.

Pls imagine it like an endless runner game. I want mouse events to work above 100000 units.

Consider reading up on:

No such thing like floating point whatever.

With the value you have, you would not be able to hit the proverbial broad side of the barn… :innocent:


  • with an actor 150k uus away

  • controller prints the name of the comp like so:

Lowering Trace Distance to 125k uus prevents get hit under from generating valid Hit Results.

  • what are you doing differently?
  • is your Game Mode using this Player Controller?
  • is your level using this Game Mode?

Hello, actually I was doing nothing different. As you mentioned, that distance should have been enough for us so we decreased the sizes to fit in the required field.
We are using a custom game mode which has same default values with the default one.
Our level is using that game mode.
We solved the issue as I explained as above.
Thanks for your effort.