Problem with getting pointed_things from raycasts

Post Reply
Posts: 123
Joined: Fri May 03, 2019 16:46

Problem with getting pointed_things from raycasts

by Eran » Post

Hi, I'm making a mod that places a temporary, invisible, non-walkable but pointable build helper node where the player is looking when pressing E, like this:
Or like this:

However I have a problem:
When I point at the side or the bottom of a node at certain angles pointing upwards, the node is placed one too low. Like this
Image This does not seem to be because the helper node is placed on another helper node, but because the pointed_thing.under and pointed_thing.above (retrieved by raycasting) are one too low.
And I can't figure out what I did wrong. Can someone here help me? I've uploaded the code here.
(19.89 KiB) Not downloaded yet
(94.34 KiB) Not downloaded yet
(248.05 KiB) Not downloaded yet

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest