trying to make an object follow the mouse cursor. Line Plane Intersection returns false

Hey. I’m trying to make a static mesh actor follow the mouse cursor on screen as a “brush” for placing meshes at runtime.

This is the first attempt, but i realized that it will not consider the camera angle, and will not really be accurate unless the camera is top down.

the removal of the Z-value just has some arbitrary numbers for checking the height of the terrain in 10000 to -10000 because i currently don’t know how to do it properly. It will be improved at a later stage when i get this working.

So i’ve been searching for a while now and i found a post where they were using Line Plane Intersection based on Player Camera Manager to resolve the issue. But i can’t get it to work.

The return value will always be false, which i figure means there is no intersection. I just can’t figure out what i’m doing wrong. I’m using the ThirdPerson example, but with the default generated terrain from a blank project.

I found the issue. Or rather my girlfriend, when explaining the problem. I showed her the code i based mine on, and she saw that i missed the normal for the plane. Leaving the post to encourage other people with bad vision to double check their code. :joy:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.