Jump to content

sbx loads objects but no terrain


AggrorJorn
 Share

Recommended Posts

perhaps you have another sbx file of the same name? Try hardcoding the path to the file...

scene = LoadScene("Maps/camerapath.sbx")

:) just know I can load my maps without any issues...

 

what are you setting the abstract path to?

 

require("Scripts/constants/collision_const")
require("Scripts/constants/engine_const")
require("Scripts/math/math")

RegisterAbstractPath("")        
Graphics(800,600)        
fw=CreateFramework()        
scene=LoadScene("Maps/train.sbx")        

controller=CreateController(1.8,0.45,0.25,45,0.9)
controller:SetCollisionType(COLLISION_CHARACTER,0)
controller:SetMass(100)
controller:SetPosition(Vec3(0,1,0))
camerapitch=fw.main.camera.rotation.x
camerayaw=fw.main.camera.rotation.y

HideMouse()
MoveMouse(GraphicsWidth()/2,GraphicsHeight()/2)

while KeyHit(KEY_ESCAPE)==0 do        
jump=KeyHit(KEY_SPACE)*6.0        
if controller:IsAirborne()==1 then jump=0 end        
gx=Round(GraphicsWidth()/2)        
gy=Round(GraphicsHeight()/2)        
dx=Curve((MouseX()-gx)/4.0,dx,3.0/AppSpeed())        
dy=Curve((MouseY()-gy)/4.0,dy,3.0/AppSpeed())        
MoveMouse(gx,gy)        
camerapitch=camerapitch+dy        
camerayaw=camerayaw-dx        
camerapitch=math.min(camerapitch,90)        
camerapitch=math.max(camerapitch,-89.99)       
fw.main.camera:SetRotationf(camerapitch,camerayaw,0,1)        
movespeed=4        
movesmoothing=10        
if controller:IsAirborne()==1 then                
	movesmoothing=200        
end 
 	move=Curve( (KeyDown(KEY_W)-KeyDown(KEY_S))*movespeed,move,movesmoothing)        
strafe=Curve( (KeyDown(KEY_D)-KeyDown(KEY_A))*movespeed,strafe,movesmoothing)        
controller:Update(camerayaw,move,strafe,jump,400,1)        
fw:Update()        
fw.main.camera:SetPositionf(controller.position.x,controller.position.y+1.8,controller.position.z,1)        
fw:Render()

Flip(0)
end
controller:Free()

ShowMouse()

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...