Hello, my building system is working so far, but I’m attempting to create a block outline that follows my mouse. It’s purpose is to show the player what the block will look like before they place it. However, it does not properly follow my mouse and I’m not sure why.
Once the block moves to Mouse.Hit.p, the value of Mouse.Hit.p changes to the top of the block as it’s been updated. The block will become out of place and start rising towards the camera if you don’t lock the Y value of the position
Yea but I recommend forcing a specific Y value if it’s for a placement system like a sandbox game, otherwise just using Mouse.Target,Size.Y/2 + newBlock.Size.Y/2 to make it appear at the top works perfectly fine
There’s an issue with this algorithm, Since the Baseplate’s size on the Y-axis is 16 and my block’s size on the Y-axis is 3, then Mouse.Target.Size.Y/2 = 8 and newBlock.Size.Y/2 = 1.5, adding these together gets me 9.5(or 10 if you wanna round up), which means that I have an outline that is ten studs above the mouse position. How can I fix this?