Yue Posted May 11 Share Posted May 11 --Error here function me:StartPlayer() if me.mesh == nil then me.mesh = LoadModel(me.world,"Models/Developer/Generic/generic.mdl") me.mesh:SetPosition(0,0.15,0) me.collider = CreateCylinder(me.world, 0.3, 1.5, 16, 1, 1) me.collider:SetColor(1,0,0,0.1) me.collider:SetPosition(0,1.1,0) me.collider:SetMass(78) me.collider:SetCollisionType(COLLISIONTYPE_PLAYER,false) -- Close App. end end function me:StartCamera() if me.camera == nil then me.camera = CreateCamera(me.world) me.camera:SetDebugPhysicsMode(true) -- Error Here too.** me.camera:SetFov(75) me.pivotNeck = CreatePivot(me.world) me.camera:SetPosition(0, 0, -me.followdistance) -- Set initial position and eye height me.camera:SetRotation(0, 0, 0) me.pivotNeck:SetRotation(me.freelookrotation) -- Synchronize with freelook rotation me.camera:SetParent(me.pivotNeck, true) end end I have error when using the commands in Lua script. me.collider:SetCollisionType(COLLISIONTYPE_PLAYER,false) and me.camera:SetDebugPhysicsMode(true) Quote Link to comment Share on other sites More sharing options...
Solution Josh Posted May 12 Solution Share Posted May 12 The value should be COLLISION_PLAYER. Where is COLLISIONTYPE_PLAYER coming from? Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Yue Posted May 12 Author Share Posted May 12 Ok, Solved. Up value. 1 Quote Link to comment Share on other sites More sharing options...
Josh Posted May 12 Share Posted May 12 Docs are updated and I added the missing method to Lua. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
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.