Making a part placement system, a semi transparent part goes to the mouse position (on client) for a preview, however, both the palced block and the preview goes underneath the ground due to its center being at the mouse position (which is exactly the surface of the ground)
I have searched a bit but I literally dont know what I would search for this
The vaguer, the bettter, but not too vague or you will get something you will not need, try putting something also like in filters like solved, so you know you will find the answer
spent like an hour searching around for the offsets and stuff and then I remember I had rotations which makes the offset not work if you rotate the block
Is it a part or model? If it’s a part, you can add + dum.Size.Y / 2
But, since you need to rotate it, you can’t do that. Your best bet is to convert the size into some sort of object space value, make it absolute, and then add it according to the orientation. I remember making something like this for a different cause, but I’m not sure how this would apply to it.
Another solution is to be lazy and call some parts in part function and move it up until it doesn’t have any.
I was thinking using pythagorean theorem to find the length between the midpoint of the part/model and the lowest point (or highest, depending on which face its on), but the problem is, I cant find the lowest point anyways
Just realized I wouldn’t even need any theorem since it’d always be a straight line parralel to either X, Y, or Z axis
This will get you the AABB of the part. I.e. the bounding box that is upright abd not rotated. Then, all you need to do is to add half the size of the Y axis, and in the future whatever other axis you need when placing it on walls for eg.