object shape key collision

this may be a dum question but im having problems with an object colliding with player when it plays a shapekey animation.
basically i have a piston object and it plays a shapekey animation witch makes part of the object stick up but the problem is if you stand on the piston and then it plays the part that sticks up doesnt collide with the player witch in turn doesnt push the player up witch it should.

Shape keys do not alter the physics mesh. You’ll need to re-instance the physics mesh. Take a look at this: http://www.blender.org/documentation/blender_python_api_2_62_release/bge.types.html#bge.types.KX_GameObject.reinstancePhysicsMesh

thanks but i dont know python thanks thow :slight_smile:

there also the actuators. should be the same, but ,seem to me which not work (just increase much the calculation)

PS: my test can be invalidate by complex setup (parent to armature, shapekey with drivers linked to bone :smiley: )

anyway try with the actuators with butto “phys”

MarcoIT im not sure i really understand what your saying, so the following question might be what you have allready said.

So is there no way of doing this making object change its physics bounds when it plays the animation of the piston extending?

bump sorry im desperate :slight_smile:

for what i see , is not possible.

but , i have tried with this system:

mesh with shapekey

shapekey linked to driver (not keyframes)

driver linked to bone (which move with python without keyframes)

is more common using the keyframe I think

anyway, can make a test with keyframes , then say the result

not, I tried with one mesh static and one simple shapekey :

with keyframe

both reinstancePhysicMesh() in python
and replaceMesh actuators , not work

the collision still only on the original mesh (shapekey basis)

there some bug in shapekey .

if you try to duplicate it you get strange error .

even with armature(+replaceMesh) is possible

so , seem which must make a workaround

by put some mesh static invisible to make a collision :smiley:

ya i tried that using a invisible mesh but it eather shoots the player and or object up in the air when the piston is extended or it makes it so the objects are halfway submerged in the piston.

to avoid this must increase the collision margin(not sure if must make this for the player, or for the obstacle, but… )

oh ok i will try that and let you know.