I’m creating a capsule mesh with a physics body, and I have a character model/mesh that I add as a child to that capsule. Despite using addChild
or setParent
, I constantly encounter this strange Y-axis offset. I can’t fit my character into the capsule properly. What could be the issue? I’m using version ^6.19.1
.
Code
(let [player (api/capsule :name "player" :height 2 :radius 0.3)]
;; SceneLoader.ImportMesh
(api/import-mesh "character.glb" (fn [new-meshes _ _ anim-groups]
(let [mesh (first new-meshes)]
(j/call player :addChild mesh))))
(m/assoc! player
:checkCollisions true
:visibility 0.3)
player)