Union issue for a tower


#1

Union issue.
Not a glitch, but something I can’t figure out.


I’m trying to make a perfect 8 faced tower head, but as you can see I can’t get the angles right on the negated parts to union it.

I’ve tried putting the negative parts at the same angles, then different angles, but I need a perfect angle on the corners for the faces to reach the same point at the very top.

Any help would be appreciated.
Thanks!


#2

If you want all of the faces to meet at a single point you should set the slope of each face proportional to its distance (x and z) to the center where the point is. This will ensure that your face meets the center at the same y value for all faces.


#3

Here is what I would suggest:


Tower Pyramids.rbxl (32.0 KB)

Due to the clipping planes not getting negated, you may need to scale the wedges.
In terms of a mathematical approach using parts to get the angle, this would probably involve Pythagorean theorem to get the lengths and then use trigonometry to solve it.

image

Just so variables are clear:
h - height of pyramid
d - distance from center to known edge L
L - length of known edge
J - length of unknown (or known in this case) edge
r - radius of the octagon
e - distance from center to edge J

Edit: Validated my math. Forgot to double d for finding J, assuming it is unknown. Example code to show it works:

local L = 4
local h = 12
local d = 4
local r = math.sqrt(((L/2) ^ 2) + (d ^ 2))
local J = math.sqrt(2 * (((L - (2 * d))/2) ^ 2))
local e = math.sqrt((r ^ 2) - ((J/2) ^ 2))
print(math.deg(math.atan2(h,d))) --Expected: ~71.6 degrees
print(math.deg(math.atan2(h,e))) --Expected: ~70.5 degrees

#4

Thanks for the comprehensive solution. It really helped.


#5

Another thing, that would be quite useful, would be to learn Blender. It’s an entirely different program, but you can just spawn a cone and then change the number of vertices (I think that’s the setting.) But, yeah: TheNexusAvenger provided a useful method, with a lot of math included, for if you want to solely stick to Roblox Studio.