Dragging without landscape

I’m sorry to translate it into translation.

That’s the problem I’m going through.

To actor drag in game, there must be a land under the cursor.

Because the position of the cursor is only applied on the land (use get hit resulte under cursor, convert cursor->world)

I want to move objects to the location of the cursor, even if there’s no land like a ue4 viewport

The solution depends on the effect you want to achieve. The issue is that without some kind of land, the distance from the camera becomes undefined and so a location can’t be chosen.

One way to solve this would be to create an invisible collider that fills the area past the land. That would give the “GetHitResultUnderCursor” node something to work with while appearing invisible to the user.

Another way would be to check if the hit result returned nothing. If it did, choose a location at a set distance from the camera, based on the position of the cursor. So that would be something like:

position = convert cursor->world
position = position + (camera forward vector * distance)