Skip to content

Buoyancy-in-parts for irregular moving water #183

Answered by jrouwe
PhoenixIllusion asked this question in Q&A
Discussion options

You must be logged in to vote

So there are a couple of problems here:

  1. It is best if the attachment point is auto calculated, so that means:
const constraintSettings = new Jolt.FixedConstraintSettings();
constraintSettings.mAutoDetectPoint = true;

and removing:

constraintSettings.mPoint1 = constraintSettings.mPoint2 = position;
  1. The createSphere function doesn't override mass, so that sphere is about 500 kg. Attaching that to a 2 kg main body gives a very unstable situation (equivalent to what happens in the samples app HeavyOnLightTest). I fixed this by adding this to the createSphere function:
creationSettings.mOverrideMassProperties = Jolt.EOverrideMassProperties_CalculateInertia;
creationSettings.mMassProperti…

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@PhoenixIllusion
Comment options

Comment options

You must be logged in to vote
2 replies
@PhoenixIllusion
Comment options

@PhoenixIllusion
Comment options

Comment options

You must be logged in to vote
4 replies
@PhoenixIllusion
Comment options

@jrouwe
Comment options

@PhoenixIllusion
Comment options

@jrouwe
Comment options

Answer selected by PhoenixIllusion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants