I'm looking into creating a Camera Type for the archives that imitates the Blitz3D camera system.
I knocked up some basic code and some comments on what each command would do. I'm at work at the moment but plan on working on this when i get home. I'm still not very familiar with OpenGL but I assume this would help a lot of people immensely.
If you want to contribute then by all means let 'er rip.
I knocked up some basic code and some comments on what each command would do. I'm at work at the moment but plan on working on this when i get home. I'm still not very familiar with OpenGL but I assume this would help a lot of people immensely.
If you want to contribute then by all means let 'er rip.
'Blitz3D style camera control 'This is Pseudo Code!! 'Camera commands would go something like: Global cam:Camera = Camera.Create() cam.position(0,20,-20) cam.rotate(30,0,0) cam.turn(0,0,0.5) cam.point(My_Entity) cam.alignto(50,20,100) Type camera Field x:Float Field y:Float Field z:Float Field pitch:Float Field yaw:Float Field roll:Float Field pitch_rate:Float Field yaw_rate:Float Field roll_rate:Float Function Create:Camera(x:Float = 0,y:Float = 0,z:Float = 0) Local c:Camera = New Camera c.x = x c.y = y c.z = z Return c End Function Method Position(x:Float,y:Float,z:Float) 'position the camera at x,y,z End Method Method Rotate(p:Float,y:Float,r:Float) 'rotate the camera to p,y,r in Euler angles End Method Method Turn(pr:Float,yr:Float,rr:Float) 'turn the camera pr,ya,rr End Method Method Point(entity:Int) 'find the xyz position of 'entity' and align the camera to it End Method Method AlignTo(x:Float,y:Float,z:Float) 'point the camera at position xyz End Method End Type