Skip to content
Discussion options

You must be logged in to vote

body = bodyInterface.CreateBody(new Jolt.BodyCreationSettings(new Jolt.MeshShapeSettings(tList), new Jolt.Vec3(), new Jolt.Quat(), Jolt.EMotionType_Static, LAYER_NON_MOVING));

There are a number of things wrong with this line:

  1. The first parameter is a Shape, not a ShapeSettings object, so new Jolt.MeshShapeSettings(tList) should be new Jolt.MeshShapeSettings(tList).Create().Get()
  2. new Jolt.Vec3() creates an uninitialized vector, you need to use Jolt.Vec3.prototype.sZero() or new Jolt.Vec3(0, 0, 0)
  3. Same for new Jolt.Quat(), you need to use Jolt.Quat.prototype.sIdentity() or new Jolt.Quat(0, 0, 0, 1)

// this throws error
// tList.push_back(new Jolt.IndexedTriangle(gi.getX(i), gi.getY(i)…

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

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

@kutu
Comment options

@LeXXik
Comment options

@kutu
Comment options

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