Builtin Library
README.md
sc.spawnPhysics (deprecated)
Deprecated — superseded by the
entityOps/scene/appearancetoolboxes. To spawn a dynamic physics entity displaying a mesh, use the entity API:local e = entity.spawn({ name = "name" }) e.component.add("Model", { model = "<mesh>" }) e.component.add("Physics", { kind = "dynamic" }) e.position = { x, y, z }
Spawns an entity carrying a model with dynamic physics, so it falls, collides, and responds to forces the moment it appears. It behaves like the static model spawn but defaults the body to dynamic. Returns the new entity's id. Reach for it when you want a physical object in play rather than a fixed piece of set dressing.