Support Forum

Not catching the mouseclick

Hey!

Everything works, but one thing… I have TargetMover and the target gets moved by reading the click on the screen. Sometimes in different areas it really does not happen - while in one area I can click wherever I want, however far from the Path I want, in other places the click in not read and I need to click very. very close to the actual path. What could be the root of this?

For example [imagine there’ s a Player in the middle :)] - in one level clicks are read throughout the screen I can click where the red dots are and the Player will move accordingly. But in other Scene the click are read only in the Green area.

Yes. Tried so many variables. It seems like there’s an invisible canvas, where the click is read and as soon as I move past it, it stops moving the Target to where A* should calculate the path and move the character.

Help?

@aron_granberg?

The TargetMover uses raycasting. It will only hit things if there’s a collider there.

1 Like

Would just an an invisible huge collider in the back do the trick?

P.S. It appears, though, that it just reads some sprites and does not read others. And none of them have cliders… Just your run of the mill sprite with the sky.

That would work I guess.
But just rewriting the TargetMover script would probably be better.

…to read non-colliders as well, right? As soon as I’ll have the time I’ll try it out and… bother you some more :smiley: thanks!

Could this be the way? @aron_granberg