I’m trying to give my mesh a larger physics body, as the one that is dealt is too small. Is this possible? I’ve tried to drill down into the lower level of CannonJS, but I’m having zero luck (see below for snippit)
var imposter = new BABYLON.PhysicsImpostor(mesh, BABYLON.PhysicsImpostor.SphereImpostor, { mass: 2, friction: 1, restitution: 0 }, this);
var body:CANNON.Body = imposter.physicsBody as CANNON.Body;
var sphere = body.shapes[0] as CANNON.Sphere;
sphere.radius = 200;
sphere.boundingSphereRadius = 200;
I did two basic tests in lines 70-80 area. Remarks are there.
Nothing discovered and learned. I THOUGHT line 73 would work just fine on its own, but no joy. Setting scaling on mesh after impostor added… seems to kill the physics. Not sure why.
Anyway, we have a playground to play-with. Stay tuned for more comments/tests.
Yeah, I did go down that path while testing @Rah I just hoped it wasn’t necessary to add compound meshes in order to achieve what I wanted… Every other physics engine I’ve used before treats the collider/imposter independently from it’s parent (mesh). Seems crazy to me!