In Havok, it appears that the PhysicsShape that you set on a PhysicsBody is not the same object if you read it back. That’s a bit confusing itself, but even more so is that isTrigger on the returned object is wrong. I wasted a good hour on that today, since I was making decisions on how to initialize objects based on whether they were a trigger or not.
Here’s an illustrative PG. The console output at this point in time is:
trigger shapes are not-equal
triggerBody.shape.isTrigger false
Ok, I found another curious thing, that may be related (or maybe not).
I get collision callbacks between my character and a trigger. The TRIGGER_ENTERED always fires, but the COLLISION_STARTED sometimes also fires when I update the character’s position (with disabledPreStep off, of course). I updated the playground to make this behavior apparent, too. Just click the mouse to update the sphere’s position randomly.
Got it. So, since the newly instantiated getShape object doesn’t expose the correct value of isTrigger, should that getter property be removed? Otherwise it’s going to confuse a lot more people than just me.