Can you help me fix 2 bugs pls
- “Heart” Waypoint drops on center and it updates only if i reopen map
- It updates every second but i need to drop it and it needs to stay on coords where i dropped it on the first place
Sorry for my English
Can you help me fix 2 bugs pls
I remember this from the other thread. But here you’re showing 2 very different methods for placing something in the world. Which one are you actually using? The 2nd screenshot is from my example - I recognise my own, ehm, handwriting. If you’re using this could you show your implementation and where it actually lives?
It updates every second but i need to drop it and it needs to stay on coords where i dropped it on the first place
Can you explain this every second update? Can you also explain what this is supposed to do:
And, lastly, if you’re adding a waypoint to the 2d map - why not add it to the actual map, why are we adding it to the viewport instead?
Hello Everynone! Yess i used your example, i used 2 methods cuz one is not working without the other . So in this video you can see the bugs. And if i reopen this “BigMap” it updates perfectly. But only if i reopen it
And by “updates every second” i mean that even when i drop it. It still updates when i move my mouse
So it’s not every second at all then; I was thinking you’re firing some kind of timer…
You’re probably still updating it
onMouseMove. Gate stop the updates of
onMouseMove by dereferencing or with a boolean.
Also, you do not need both methods, they’re very different and serve a different purpose. One of them will not work with uneven terrain - like your landscape. The waypoints will end up under ground or hanging in the air… If you have a landscape, you’ll need to trace to plop down a waypoint accurately.
Besides that, the thread I linked in the other post, go deep into how to make the player controller know that you’re moving a widget, if that’s necessary.
Thanks, but do you know what causes it dropping on the center? Then it updates when i reopen it?
You want me to guess how you scripted it?
I used your example, this one
so its spawns actor right next to my character, not where my mouse is pointed.
can you please help to script it so its drops on where my mouse is on im noob
How are you getting mouse position to start with? It cannot be 0, obv.
If you want to spawn at mouse position, you must produce the coordinates for the node to work with. See if this works for you:
To me it looks like you never bothered visiting the thread I linked - the examples are all there
If you pipe in
Viewport Size, it would behave as if your mouse was in the very bottom-right corner.
the thread I linked
If you’re playing in a
Window, you may need to convert
Absolute to Viewport, too (or use some other way to figure out where the mouse is in viewport):
If you don’t, and have more that 1 monitor, and/or test stuff in a window, you are going to have a bad time.
Looks Ok - does it work?
Nope :(. I think that deproject on screen is creating location from camera that behind character
It’s using the camera, yes, if the trace hits the back of the characters head, you will get a hit there.
You can create a custom channel that that the character ignores and the landscape blocks.
Haha sorry for giving you headache but how can i do that? Or Maybe i need to create a camera that captures full map from the sky
Could work but seems fussy. What if we’re underground? Or under a tree? What if you place the waypoint on top of the starscrapper?
New tracing channel ignored by all:
And then ensure the actual landscape or floor mesh blocks it:
And if you need to place the waypoint on top of the building or on its wall, have the building block that channel, too.