Make the playground toys real mechanisms #113
Labels
No labels
animation
audio
blocked
bug report
controversial
documentation
easy
feature request
hard
medium
multiplayer
physics
ui
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
#71 Ride the zip line and play on the playground
elsie/liuverse
#110 Add a physics engine (rapier3d)
elsie/liuverse
#114 Let players fall over
elsie/liuverse
Reference
elsie/liuverse#113
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The playground furniture is baked and drawn — the seesaw, the climbing frame,
the fitness station — but it is scenery. The seesaw is a plank on a fulcrum
that never tips, the swing is a frame with nothing hanging from it, and the
slide is a ramp you walk up.
These are the most obvious mechanisms in the campus, and a physics engine is
exactly what turns a mechanism into a mechanism. Rapier's joints are the
whole feature: a revolute joint for a hinge, a spring joint for a swing seat,
a rope joint for a zip line's cable, a prismatic joint for a slide.
The three toys
on one end tips it. Two players on either end balance it, which is the first
genuinely multiplayer playground toy in the campus.
limits to stop it going over the bar. A player sits in it and pumps with the
keys; the swing carries its own momentum.
with a low-friction surface. The simple version is a slope with a low
friction coefficient, which needs no joint at all.
posts gives a maximum distance, which is the cable; the handle slides down
it under gravity. The playground with the zip wire is the only one of its
kind in the extract, which is what makes it worth finding.
Where it fits
The playground props are baked —
PROP_SEESAW,PROP_CLIMBING,PROP_PLAYGROUND— and drawn byliuverse-scene::propsas one triangle soupper kind. A mechanism is two things: the static frame that is already drawn,
and a moving part that is not. The moving part is a
SceneSpecobject slotlike a scooter, because it moves and it is not part of the baked campus.
The joint bodies live in the physics world, which is server-authoritative, so
the swing's angle travels on the wire like a vehicle's pose does. The swing is
the simplest possible case: one angle, one position, one id. The seesaw is
the interesting one, because two players on it means both clients have to
agree about where the plank is, and the server is the only one that can say.
The hard part is the player on it
A player on a seesaw has to be carried by it. Rapier can carry a body — a
player standing on a moving platform is a kinematic body moving under a
dynamic one — but a player on a seesaw is not standing on it, they are
riding it, and the ride has to be a constraint rather than a contact. That
means the player body becomes a physics body while mounted, which is a bigger
change than the toy itself and probably wants the ragdoll work first.
The swing is easier and worth doing first: the player sits, the seat hangs
from a joint, and the seat carries the player because it is the same rigid
body.
Related
physics body and not a pose.