Thanks for formatting nicely.
Your warning about config being undefined means that you are using a variable (config
) that hasn’t been defined. It’s equivalent therefore to passing nil
to platypus.create()
. I expect that the error you have shared isn’t the first thing that comes up. I expect you see this before?
You must provide a config
Here is documentation about configuring a platypus instance:
Here’s an example of it being done in practice:
In the example above, config isn’t declared as a separate variable. For clarity, this is equivalent:
local config = {
collisions = {
separation = platypus.SEPARATION_RAYS,
groups = {
[hash("ground")] = platypus.DIR_ALL,
--[hash("onewayplatform")] = platypus.DIR_ALL,
[hash("onewayplatform")] = platypus.DIR_DOWN,
[hash("onewaydoor")] = platypus.DIR_LEFT,
},
left = 4, right = 4, top = 7, bottom = 6, offset = vmath.vector3(0, 7, 0)
},
gravity = -800,
max_velocity = 300,
allow_double_jump = true,
allow_wall_jump = true,
allow_wall_slide = true,
wall_slide_gravity = -50,
debug = true,
}
self.platypus = platypus.create(config)