Sorry where is this setting placed?
I don’t know how your world looks like. If you’re using a landscape - that’d be the landscape in the World Outliner. If you’re using a static mesh as floor, it will be there.
Looks like a landscape imported from a heightmap in the pic in the 1st post.
Essentially, every actor can have a uniquely filtered collision interaction. Those channels dictate who is allowed to ignore / overlap / collide with whom.
More info if you ever need to fiddle with it more:
Can you post your current tracing script again? And the collision settings of the landscape?
Not sure what to say, plugging the above script produces this:
Is this the intended behaviour? Dropping a widget generates a world hit from the trace, with the channel filtering ignoring the undesirable elements.
Debug, step through it, print / watch the data - see why /when you’re getting incorrect location.
What is the actual location the trace spits out?
I’m not 100% certain how you need it to work. Perhaps a different method is needed altogether.
We’re dropping the waypoint on the grey map, right? And it should spawn an actor at those coords in the world?
I guess, translating the widget dimension is better here, and using the resulting then tracing from the top-down. Essentially what you suggested at some point yourself.
Yep
So i need to create actor with camera and script “on drop” to take information from that new actor camera right?
Not sure what that means.
Use this but rather than placing an actor, trace from the top down. The 600 would be the dimension of the world the map covers.
Do you have any thoughts on why it drops on the center? And then it updates when i reopen it
No. How can I tell how you scripted it…
Ok Thank you so much for your time
What you want is here:
You just need to translate widget coord to world coords correctly. And use the resulting data to trace. Either from the camera, or from the top → down. If your widget is nested, there may be additional steps needed. But that’s me guessing.
No. How can I tell how you scripted it…
I don’t think you’ve ever showned how you’re adding the widgets to the map. And when I asked why we’re adding the widgets to the viewport rather than to the map, you did not answer - or I missed it (or mixing things up)
Perhaps you could clarify that.
This makes little sense. You’re not adding the waypoints to the map, you’re just placing them in the viewport. This may work in certain scenarios but may go complete and utter bonkers. Let’s say the user changes resolution or you do not anchor the map widget properly. It will be a mess. The waypoints should become part of the map.
You will want the map to have a canvas, dropping the widget adds it to that canvas.
I’ll try to post something more complete, hold tight. Gonna be swamped until midday/aternoon.
So my code now looks like this
And i implemented your code in “OnMouseMove” function
this is my map widget, i added this “DragWidget”
That’s my “DragWidget”
And this is my “MainWidget” that i show to the player controller
My example will need to be simplified due to time constraints:
- map widget with some additional waypoint user widgets that can be dragged:
- onDrop with a visible border
- this results in a 2d widget space generating coords for the 3d world, and the waypoint markers become part of the map:
Hope you can work with this, hope that’s it.
Took me too long to realise what you’re were really after. Sometimes I just don’t get it. My bad.
I love you man. It worked <3