Page 1 of 1

Showing contact forces visually

Posted: Thu Sep 17, 2020 9:17 pm
by joehays
Does anyone know of a way to graphically show contact forces in the simulation GUI? Are there any examples that show how to do this?

Re: Showing contact forces visually

Posted: Tue Oct 13, 2020 10:54 pm
by jwhitman
I've never seen an example of that idea in particular, but, it should be possible with the functions getContactPoints and addUserDebugLine. One can get the contact force and normal with getContactPoints, then for each contact use addUserDebugLine to create a line in the direction of the contact force normal and with length proportional to the force magnitude.