After testing Joints, I realized they don't affect Entities at all. I found your example, but even with it, I couldn't get anything done. Please help.
Example:
/// ```ignore
/// commands.spawn(BallSocketJoint::new(entity_a, entity_b));
/// ```
// --- Dynamic sphere a ---
let entity_a = commands.spawn((
RigidBody::Dynamic,
BepuCollider::sphere(1.0),
Mass(1.0),
Mesh3d(meshes.add(Sphere::new(1.0))),
MeshMaterial3d(materials.add(StandardMaterial {
base_color: Color::srgb(0.8, 0.2, 0.2),
..default()
})),
Transform::from_xyz(0.0, 4.0, 1.0),
)).id();
// --- Dynamic sphere b ---
let entity_b = commands.spawn((
RigidBody::Dynamic,
BepuCollider::sphere(1.0),
Mass(1.0),
Mesh3d(meshes.add(Sphere::new(1.0))),
MeshMaterial3d(materials.add(StandardMaterial {
base_color: Color::srgb(0.8, 0.2, 0.2),
..default()
})),
Transform::from_xyz(0.0, 4.0, 0.0),
)).id();
commands.spawn(BallSocketJoint::new(entity_a, entity_b));
After testing Joints, I realized they don't affect Entities at all. I found your example, but even with it, I couldn't get anything done. Please help.
Example:
My code: