I was wondering how you would make bubbles in 3d(by using spheres). Would you use TranslateEntity or would it have to do anything with the texture or what? Thanks for all help.
Rubiks14
Rubiks14
Graphics3D 800,600,32 SetBuffer BackBuffer() cam = CreateCamera() PositionEntity cam,0,0,-10 CameraClsColor cam,200,50,150 light = CreateLight() TurnEntity light,40,70,0 bubble = CreateSphere(32) PositionEntity bubble,0,0,-5 EntityColor bubble,0,100,200 EntityAlpha bubble,.5 EntityShininess bubble,1 EntityBlend bubble,3 ang# = 0.0 While Not KeyHit(1) ScaleEntity bubble,1+(Sin(ang)*.05),1+(Cos(ang)*.05),1 ang = (ang + 10) Mod 360.0 RenderWorld Flip(1) Wend End
Graphics3D 800,600,32 SetBuffer BackBuffer() SeedRnd MilliSecs() cam = CreateCamera() CameraClsColor cam,100,0,100 PositionEntity cam,0,0,-5 light = CreateLight() light2 = CreateLight() TurnEntity light,50,90,0 TurnEntity light2,90,50,0 bubble = CreateSphere(32) inside = CreateSphere(32) FlipMesh inside AddMesh inside,bubble FreeEntity inside EntityShininess bubble,1 EntityBlend bubble,3 EntityFX bubble,2+32 ss = 0 ee = 155 surf = GetSurface(bubble,1) For i = 0 To CountVertices(surf)-1 VertexColor surf,i,50,Rand(ss,ee),Rand(ss,ee),.6 Next ang# = 0.0 While Not KeyHit(1) ScaleEntity bubble,1+(Cos(ang)*0.05),1+(Sin(ang)*0.05),1+(Cos(ang)*0.05) ang = (ang + 10) Mod 360.0 TurnEntity bubble,.5,.5,.5 RenderWorld Flip True Wend End