37.4.10 RigidBody
RigidBody : X3DNode, X3DBoundedObject {
[snip]
MFNode [in,out] geometry [] [X3DNBodyCollidableNode]
[snip]
}
https://www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/UniversalJointExample.x3d
https://www.web3d.org/x3d/content/examples/Basic/RigidBodyPhysics/UniversalJointExample.json
Problematic area in JSON:
{ "RigidBody":
{
"@DEF":"BODY-2",
"@angularDampingFactor":0,
"@mass":0.1,
"@orientation":[0.0,0.0,1.0,0.7854],
"@position":[-0.35355,-0.35355,0.0],
"@useGlobalGravity":false,
"-geometry":
{ "CollidableShape":
{
"@USE":"BOX-GEOM-2"
}
}
}
}
Proposed/Recommended fix:
{ "RigidBody":
{
"@DEF":"BODY-2",
"@angularDampingFactor":0,
"@mass":0.1,
"@orientation":[0.0,0.0,1.0,0.7854],
"@position":[-0.35355,-0.35355,0.0],
"@useGlobalGravity":false,
"-geometry":[
{ "CollidableShape":
{
"@USE":"BOX-GEOM-2"
}
}
]
}
}
Note additional square brackets around CollidableShape object in fix.
Even if the examples in the archive are bad, we still have to be concerned in JSON between an SFNOde (object) and MFNode (array).
Diff: