I create a cube, I create a larger sphere that's slightly offset, and then I subtract the sphere from the cube.
The result should be half a cube with a curving right hand edge, but what actually happens is nothing.
autocam off
sync on
sync rate 60
make light 1
set directional light 1, -5, -5, 5
DRAW SPRITES LAST
position camera 0,0,-50
point camera 0,0,0
do
if (mouseclick() = 1)
Repeat : Until mouseclick()=0
make_curve()
endif
sync
loop
function make_curve()
local curveToCreate as integer
local subtractor as integer
` make the base block that will become the curve
curveToCreate = FIND FREE object (201,301)
MAKE OBJECT cube curveToCreate,1
POSITION OBJECT curveToCreate, 0,0,-28
` make a larger sphere, and subtract from the slope block
subtractor = FIND FREE object (201,301)
MAKE OBJECT sphere subtractor,2
POSITION OBJECT subtractor, 0.4,0.4,-28
` comment out the csg and delete object lines, and you
` can see that both the cube and the sphere are created.
` comment out just the csg line, and the sphere will
` be deleted, so the issue must lie with the csg command.
perform csg difference curveToCreate, subtractor
DELETE OBJECT subtractor
endfunction
Is it because I end up with a concave shape? If so, is there a way around it without modelling?
If it helps, what I'm after is something that looks like the left side of this halfpipe, but without the lip.