Blitz3D NG camera centering problem

(Posted 3 months ago) PlastikCogLiquid

Hi all, I'm trying to use this old camera code from 2003 and it works, but it doesn't point at the entity center. I'm just posting this as a bug report I guess, not sure where else to put it. It works correctly in regular old Blitz3d but not quite right in Blitz3d NG, the camera points to the left of the entity. You can paste it directly and run it to test it out, what you think about this Rontek?:

; SuperCam!
; by PsychicParrot 2003
; Usage : SuperCam(cam,ent,cspeed#,dist#,hite#,xrot#,tilt#)

Graphics3D 640,480,16,3

Global campivot=CreateCube() ; create pivot for camera
Global camera=CreateCamera()  ; create camera (!!!)

; ---------------------- THIS IS ALL JUST TO POPULATE THE WORLD WITH SOME RUBBISH ---------------

Global light=CreateLight()
Global player=CreateCube()    ; create simple player
Global plane=CreatePlane()   ; create simple floor
MoveEntity player,0,1,0
; Create texture of size 256x256

; Set buffer - texture buffer
SetBuffer TextureBuffer(tex)

; Clear texture buffer with background white color
For i=1 To 10
Color Rnd(0,255),Rnd(0,255),Rnd(0,255)
Rect Rnd(0,256),Rnd(0,256),Rnd(0,256),Rnd(0,256)

; Texture cube with texture
EntityTexture plane,tex
EntityTexture player,tex

; Set buffer - backbuffer
SetBuffer BackBuffer()

; ----------------------------------------------------------------------------------------------

While Not KeyHit(1)

If KeyDown(200) Then
        MoveEntity player,0,0,.2
End If

If KeyDown(203) TurnEntity player,0,1,0
If KeyDown(205) TurnEntity player,0,-1,0





Function SuperCam(cam,ent,cspeed#,dist#,height#,xrot#,tilt#)

TFormPoint 0,height#,-dist#,ent,0


TranslateEntity cam,cx,cy,cz
PointEntity cam,ent
RotateEntity cam,xrot#,EntityYaw(cam),tilt#

End Function
(Posted 3 months ago) RonTek commented:

Hey PlastikCogLiquid, as far as I know Blitz3D NG is still work in progress so don't expect everything to work out of the box.

You can also try the DirectX mode/renderer if that is still possible.

(Posted 3 months ago) Grindalf commented:

I found all of my code worked fine with NG but you would be best to let Kevin know in the discord

(Posted 2 months ago) PlastikCogLiquid commented:

Thanks! I posted in the Discord channel, hopefully it helps narrow down a bug. :]

Reply To Topic (minimum 10 characters)

Please log in to reply