I have two boxes. How do I get the area of crossover? See image:
Thanks,
Do you want to detect if a crossover happens? Or do you want to get the actual area (in-between) of what is intersecting.
I want to create another box like the orange and blue, its shown in black.
position of edge of orange:
orange.Position - 1/2(orange.Size.X)
– its either X or Z, and it could be a plus or a minus, really depends on your game. go figure this part out yourself
position of edge of blue
blue.Position - 1/2(blue.Size.X)
–same thing applies here.
SUBTRACT both results together to get the HEIGHT/LENGTH of Black.
for the breadth,
just take however long the breadth is for the blue figure
area = length times breadth.
its really about math here not scripting