"Bouncy" physics with Triangle Mesh setting

For me, dynamic/rigid body objects have these jerky reactions when their physics are set to Triangle Mesh. Perhaps a video would explain better:

Does this happen for anyone else?
Raising the form factor, damping, or collision margin values don’t help.
I’m using 2.76b

triangle mesh is a crude sim method, most GE now convert triangle mesh into many convex hulls before runtime,

in our case, I think making a ‘GFX mesh’ and many physics meshes by hand is the only option at the moment,

The reason I ask is that I want to be able swap my game character’s collision meshes, between a standing mesh and a crouching mesh. But the reinstancePhysicsMesh method only works with the triangle mesh setting. So is there no other way to swap physics meshes in real time?

I see, I thought you meant -> convex actor -> triangle mesh ground plane.

one sec.

ok solution (I hope) ->

test blend

Tab = crouch

W = walk forward

Attachments

PhysicsDuck.blend (477 KB)

@@BluePrintRandom Nice trick, I’ve always thought compound physics are static only, the way you could move/animate them while remove/set parenting to update its collision shape opens up a whole new level of interactive physics for me

Thanks a lot, this will do

I will try this later on Tac E, really hope it works :slight_smile:

Im having a problem. I set this up on my player and when i let go of the "TAB" underneath a box it spass out lol.
Also for some reason when i let go of Tab in my game it does not reset the “Clock” property, am i missing something bro ?

without a blend I don’t know, also you need to adjust numbers based on the height of the ‘head hitbox’

Okay i changed and working perfect :slight_smile:

ray = own.rayCast(own.worldPosition+(own.worldOrientation.col[2]*(2

but when you go underneath something and let go of tab it shakes lol, is there a work around mate

Maybe using a collision sensor object instead of a ray, or more raychecks,
I will take a deeper look at it soon.

Sweet just uploading a video too show you, a little more tweaking it should be perfect :slight_smile:

I let go of tab when i`m underneath cube to show you what happens.

Any way we can make “Tab” toggle ? like when we press tab it stays in, the press “Tab” again to stand up ?

The ray that detects if a object is blocking needs to reach above the cylinder,

That is what my math is, I will need to take a look at it, but when he stops ducking you should see the ray above the.cylinder (check it out in wire frame)

That is what the bge.rendee.drawLine is drawing,

the ray that prevents the actor from standing up if there is a obstruction,

Yeah the box shakes when underneath a object though, witch makes the armature of a mesh shake too :slight_smile:

yeah, the ray was not long enough, in your file, so it was allowing him to ‘unduck’ when that was a bad idea, also your crouch animation needs to have a crouch idle that you play while the duck clock is active