First of all, I want to apologize for my strange English : I'm French

I'm not an expert in C, so I have some issues to understand how Chipmunk works. I'm trying to simulate the effect of the sand when we try to roll with a ball in it, and I can't do that just with the e, u and surface_v in the class cpShape.
So, I tried to put a condition when there is a collision between the ball and the sand, which reduce the horizontal velocity of the ball (to simulate the fact that we can't go fast in sand and that the ball will slow down very quickly).
I used a cpCollFunc, so I added a CollisionPairFunc ( cpSpaceSetDefaultCollisionPairFunc(space, collisionFunction, NULL); ) and collisionFunction will test if the ball is in the sand, and how it will affect the velocity. (with an extra cpFloat that I add in cpBody)
It kind of works, but it is not quite what we can expect in a physical engine, to "cheat" with some tests....
Is there an other way to do that, without cheating ?
Thanks for helping !