Left Mouse button pressed and released equivalent in enhanced input (or drag and drop)

Here’s some script allowing for picking up stuff and moving it in a specific plane only we determine ourselves manually:

The green debug plane visualises what’s going on. In short: shoot a beam (trace) from the screen centre towards the projected mouse cursor, when it eventually intersects that plane (which is infinitely large), place the actor at the intersect world coordinate.

If I change the normal:

You could derive this Normal from the actor itself instead:


Or you can get it from the surface in the world - tracing returns a Normal, you do not need the virtual plane then:


I haven’t understood anything

Set up a new project, replicate the above, experiment, see what you can learn. At some point the whole thing will click.

1 Like