Skip to content

Cast Shape #70

Answered by jrouwe
LeXXik asked this question in Q&A
Dec 6, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

transform.sTranslation(position);
transform.sRotation(rotation);
transform.sScale(scale);

Functions prefixed by an 's' are static functions, so they will not modify transform, their purpose is to create a matrix.

You'll want to use:

const transform = Jolt.Mat44.prototype.sRotationTranslation(rotation, position);

or simply:

const transform = Jolt.Mat44.prototype.sTranslation(position);

since your rotation is identity.

This matrix cannot contain any scale (you're passing scale as a separate parameter to CastShape).

Replies: 1 comment 1 reply

Comment options

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

Answer selected by LeXXik
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