Hi All
Been trying to make a hole in a wall but not having much success, however came upon this, a box that you can see through one side only the other side is solid.
run and see.
Rem Created: 19/03/2008 09:57:31
Rem ***** Main Source File *****
sync on
sync rate 60
autocam off
SET IMAGE COLORKEY 0,0, 0
cls rgb(255,255,0)
get image 1,0,0,100,100,1
cls 0
get image 2,0,0,100,100,1
position camera 0,30,50,-150
MatrixNumber=1
make matrix MatrixNumber,1000,1000,25,25
position matrix MatrixNumber,-500,-25,-510
wall=1
make object plain wall,100,50
texture object wall,1
hole=2
make object box hole,25,25,5
position object hole,0,0,0
texture object hole,2
`SET OBJECT TRANSPARENCY hole,2
`SET OBJECT TRANSPARENCY wall,1
ghost object on hole,4
rem CSG Commands
` PERFORM CSG UNION TargetObject, BrushObject
` PERFORM CSG DIFFERENCE TargetObject, BrushObject
` PERFORM CSG INTERSECTION TargetObject, BrushObject
` PERFORM CSG UNION ON VERTEXDATA BrushMesh
` PERFORM CSG DIFFERENCE ON VERTEXDATA BrushMesh
` PERFORM CSG INTERSECTION ON VERTEXDATA BrushMesh
rem CSG Commands
` PERFORM CSG UNION hole,wall
PERFORM CSG DIFFERENCE hole,wall
PERFORM CSG INTERSECTION hole,wall
` PERFORM CSG UNION ON VERTEXDATA wall
` PERFORM CSG DIFFERENCE ON VERTEXDATA BrushMesh
` PERFORM CSG INTERSECTION ON VERTEXDATA BrushMesh
`position camera object position x(wall),object position y(wall),object position z(wall)
do
rotate object hole, 0,object angle y(hole)+1, 0
control camera using arrowkeys 0,.1,.1
set cursor 0,0
print camera position x(0)
print camera position y(0)
print camera position z(0)
sync
loop
edit
small change added SET REFLECTION SHADING ON, one side does not reflect but the others do.
Rem Created: 19/03/2008 09:57:31
Rem ***** Main Source File *****
sync on
sync rate 60
autocam off
SET IMAGE COLORKEY 0,0, 0
cls rgb(255,255,0)
`get image 1,0,0,100,100,1
load image "brick2_t.bmp",1
cls 0
get image 2,0,0,100,100,1
position camera 0,30,50,-150
MatrixNumber=1
make matrix MatrixNumber,1000,1000,25,25
position matrix MatrixNumber,-500,-25,-510
wall=1
make object plain wall,100,50
texture object wall,1
hole=2
make object box hole,25,25,25
position object hole,0,0,0
texture object hole,2
SET REFLECTION SHADING ON hole
`SET OBJECT TRANSPARENCY hole,2
SET OBJECT TRANSPARENCY wall,1
ghost object on hole,4
rem CSG Commands
` PERFORM CSG UNION TargetObject, BrushObject
` PERFORM CSG DIFFERENCE TargetObject, BrushObject
` PERFORM CSG INTERSECTION TargetObject, BrushObject
` PERFORM CSG UNION ON VERTEXDATA BrushMesh
` PERFORM CSG DIFFERENCE ON VERTEXDATA BrushMesh
` PERFORM CSG INTERSECTION ON VERTEXDATA BrushMesh
rem CSG Commands
` PERFORM CSG UNION hole,wall
PERFORM CSG DIFFERENCE hole,wall
PERFORM CSG INTERSECTION hole,wall
` PERFORM CSG UNION ON VERTEXDATA wall
` PERFORM CSG DIFFERENCE ON VERTEXDATA BrushMesh
` PERFORM CSG INTERSECTION ON VERTEXDATA BrushMesh
`position camera object position x(wall),object position y(wall),object position z(wall)
do
rotate object hole, object angle x(hole)+1, object angle y (hole)+.5,0
control camera using arrowkeys 0,.1,.1
set cursor 0,0
print camera position x(0)
print camera position y(0)
print camera position z(0)
sync
loop
mods if you can think of a better title could you change it please.
Dark Physics makes any hot drink go cold.