Camra Move Enity

Blitz3D Forums/Blitz3D Beginners Area/Camra Move Enity

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

When moving my camra It seems to not move at all..

Is there a reason I can not move the camra with move enity or position enity.

I can move the camra fine by using the standard buttons for up and down.


If KeyDown( 205 )=True Then TurnEntity camera,0,-2,0; <- Basic navigateiong Testing
If KeyDown( 203 )=True Then TurnEntity camera,0,2,0; <- Basic navigateiong Testing
If KeyDown( 208 )=True Then MoveEntity camera,0,0,-2; <- Basic navigateiong Testing
If KeyDown( 200 )=True Then MoveEntity camera,0,0,2; <- Basic navigateiong Testing


But What i am doins if checking to see if the camra / me has jumped out of bounds.

I have a 3d tile map i have layed down over the area.

Then i have a function I call



;This is the World Positing Checker
Function COL(col)

If col >= 1024 And col <= 1536 Then
col = 5
ElseIf col >= 512 And col <= 1024
col = 4
ElseIf col >= 0 And col <= 512
col = 3
ElseIf col >= -512 And col <= 0
col = 2
ElseIf col >= -1024 And col <= -512
col = 1
End If
Return col
End Function


Function ROW(ROW)

If row >= 1024 And row <= 1536 Then
row = 1
ElseIf row >= 512 And row <= 1024
row = 2
ElseIf row >= 0 And row <= 512
row = 3
ElseIf row >= -512 And row <= 0
row = 4
ElseIf row >= -1024 And row <= -512
row = 5
End If
Return row
End Function



Then Say you are standing on block row(z) = 3 and col(x) =3 then fine. now when you jump to the next row say you trevel forword on the tile. I have managed to shift the whole world,evrything.

But for some reason the Camra wont move using a stardared positing enity.

;Set Landblock
If col(x) = 3 And row(z) = 3 Then
Else If col(x) = 3 And row(z) = 2
;Users has moved forword

;Physical Layer Tracker - Update Layer Big Large CODE

currentblock = P13 ; Set Camra to center landblock

MoveEntity camera,x#,y#,z# - 512 ; Player has moved to far on the Z axis so we need to pull him back the length of one tile where we have redrawn the world.

Else

currentblock = nb

End If




If currentblock <> nb Then
terra_y#=TerrainY(currentblock,x#,y#,z#)+10
Else
terra_y# = 150 ; FLY LIKE A Eagle
End If


PositionEntity camera,x#,terra_y#,z#