how can i set the Friction to terrain?

sssa2000
Posts: 12
Joined: Thu Oct 26, 2006 8:36 am

how can i set the Friction to terrain?

Post by sssa2000 »

i have create a terrain for bullet,
i do not know how can i set the Friction to the terrain surface,

how can i set it?

many thanks!
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: how can i set the Friction to terrain?

Post by Erwin Coumans »

Do you want per-triangle different friction, or just one friction value for the whole terrain?

If you want per-triangle friction, check the Bullet/Demos/ConcaveDemo/ConcavePhysicsDemo, in particular the friction callback called 'CustomMaterialCombinerCallback'.

Otherwise, just set the friction for the whole terrain in the btRigidBody, using setFriction.

Hope this helps,
Erwin

sssa2000 wrote:i have create a terrain for bullet,
i do not know how can i set the Friction to the terrain surface,

how can i set it?

many thanks!