Yue Posted May 11, 2024 Posted May 11, 2024 --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 Murphy's Law: We don't fix bugs, we document them as features. – Murphy Games
Solution Josh Posted May 12, 2024 Solution Posted May 12, 2024 The value should be COLLISION_PLAYER. Where is COLLISIONTYPE_PLAYER coming from? Quote Let's build cool stuff and have fun.
Yue Posted May 12, 2024 Author Posted May 12, 2024 Ok, Solved. Up value. 1 Quote Murphy's Law: We don't fix bugs, we document them as features. – Murphy Games
Josh Posted May 12, 2024 Posted May 12, 2024 Docs are updated and I added the missing method to Lua. Quote Let's build cool stuff and have fun.
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.