Something changed In the expanded version...
BlitzMax Forums/MiniB3D Module/Something changed In the expanded version...
| ||
Okay so I did change to Klepto.minibrd (0.41) I tought it wasn't drawing anything but it was because the camera acted weird Type TCam Field cam:TCamera Field target:Tpivot Field targeted:Byte Function Create:TCam(x1:Float,y1:Float,z1:Float,tg:Byte=0,x2:Float=0,y2:Float=0,z2:Float=0) Local cam:Tcam = New Tcam If tg=1 cam.targeted=1 cam.target = CreatePivot() PositionEntity cam.target,x2,y2,z2 cam.cam = CreateCamera() PointEntity cam.target,cam.cam EntityParent cam.cam,cam.target PositionEntity cam.cam,x1,y1,z1 Else cam.cam = CreateCamera() PositionEntity cam.cam,x1,y1,z1 cam.targeted=0 EndIf Return cam End Function Method Update() If targeted = 1 PointEntity cam,target 'PointEntity target,cam EndIf If canvas_K_u =1 MoveEntity target,0,0,0.1 EndIf If canvas_K_j =1 MoveEntity target,0,0,-0.1 EndIf If canvas_K_h = 1 MoveEntity target,-0.1,0,0 EndIf If canvas_K_k = 1 MoveEntity target,0.1,0,0 EndIf If canvas_K_y = 1 MoveEntity target,0,0.1,0 EndIf If canvas_K_i = 1 MoveEntity target,0,-0.1,0 EndIf Return End Method Method MoveCamera(x:Float,y:Float,z:Float) MoveEntity cam,x,y,z End Method Method PositionCamera(x:Float,y:Float,z:Float) PositionEntity cam,x,y,z End Method Method MoveTarget(x:Float,y:Float,z:Float) If targeted = 1 MoveEntity target,x,y,z Else Return EndIf End Method Method PositionTarget(x:Float,y:Float,z:Float) If targeted = 1 PositionEntity target,x,y,z Else Return EndIf End Method Method RotateCamera(x:Float,y:Float,z:Float) RotateEntity cam,x,y,z End Method Method TurnCamera(x:Float,y:Float,z:Float) TurnEntity cam,x,y,z End Method Method RotateTarget(x:Float,y:Float,z:Float) If targeted = 1 RotateEntity target,target.rx+x,target.ry+y,target.rz+z,1 Else Return EndIf End Method Method TurnTarget(x:Float,y:Float,z:Float) If targeted = 1 TurnEntity target,x,y,z Else Return EndIf End Method End Type Now it acts diferent and it seams that Pointentity does not work anymore |