Area Change affected by gravity

Blitz3D Forums/Blitz3D Programming/Area Change affected by gravity

;loads the new area
Function LoadArea2()
CURRENTAREA=2
;Light Settings
AmbientLight 150,150,150
CameraFogMode cam,1
CameraFogRange cam,-2000,500
CameraRange cam,1,500


;free prevoius mesh, if any
If Not AREAMESH=0 FreeEntity AREAMESH
;load the mesh
AREAMESH=sLOADMESH("3ds\HulkR.3ds")
EntityType AREAMESH,areatype
PositionEntity AREAMESH,0,0,-5
ScaleEntity AREAMESH,1.3,1,1.3
EntityPickMode AREAMESH,2,True
EntityColor AREAMESH,158,158,158
AREACOLLISSIONS()
end function



;this is called in the main loop after flip
Function CheckAreas()

Local NEWAREA

NEWAREA=0

Select CURRENTAREA
Case 1
If EntityX(cam)<=(-3898) NEWAREA=2
Case 2
If EntityX(cam)>(-3898) NEWAREA=1
End Select

If NEWAREA>0
DrawImage LoadingNEWAREA,screenW/2,screenh/2:Flip
Select NEWAREA
Case 1 loadarea1()
Case 2 loadarea2()
End Select
EndIf



End Function

gravity is just a negative y translation, which takes place if there is an Areamesh.

collision with the area is entitysphere to area poly



I'm going to try slightly increasing the players y co-ordinate when this point is reached, but its a strange solution, and will be rather noticable as a botched up job


Edit:********************************************************
The Y increase wasnt too bad, and the re-establishment of
player to area collissions was the real culprit, so thanks!