ddave104
(ddave104)
September 10, 2025, 8:00pm
1
I’m trying to push a box in the direction my player is facing.
I want the player to be able to enter a box collision a widget to come up to click E key (this part I have) and for the box to move in a precise amount across direction the player is looking at. Then delay so that then the player if want can do it again.
How would I be able to do this?
illspiritx
(illspiritx)
September 11, 2025, 5:10am
2
Maybe something like this?
When player presses push button (teh long blue noodle is coming from an overlapped box actor):
Call function or interface on target:
I can’t get it to work consistently though. The vector snap to grid math node keeps randomly failing to work for me, May be bugged?
1 Like
illspiritx
(illspiritx)
September 11, 2025, 7:16am
3
On second thought. instead of using vector grid snap, you could isolate the x/y direction so it only goes in straight lines:
That GetNSEW function does this to give a normalized cardinal direction:
Finally, I changed the box to use tick for the vinterp:
Can tweak he multiply node in first pic to change how far the box moves.
And if lots of things need to be locked to xor y movement, could toss that GetNSEW function into a library
1 Like
Ram07
(Ram)
September 11, 2025, 7:23am
4
Hi, i too checked and the solution given by @illspiritx is working. I did try this in tick but you can convert as per your requirement
ddave104
(ddave104)
September 11, 2025, 8:46pm
5
Thank you very much your code was what I needed, I changed something here is the final code is anyone needs it.