Hi,
I am trying to compute the force (F) at the contact point location. I define F=I*60, where I is the impulse. For the direction, I assign the normal to the master object (N):
N = m_normalWorldOnB
However, N is not always outward pointing. Does this make sense? Is there a better way of characterizing the force at the contact location?
Thanks in advance,
Xuhai
The question about m_normalWorldOnB
-
Erwin Coumans
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: The question about m_normalWorldOnB
The normal is pointing from object B towards object A.
If this is not the case, please provide a reproduction case.
Thanks,
Erwin
If this is not the case, please provide a reproduction case.
Thanks,
Erwin
-
Xuhai.Tang
- Posts: 16
- Joined: Wed Feb 23, 2011 4:54 pm
Re: The question about m_normalWorldOnB
Thank you.Erwin Coumans wrote:The normal is pointing from object B towards object A.
If this is not the case, please provide a reproduction case.
Thanks,
Erwin
I have found the reason.
(1) I changed ‘#define CONVEX_DISTANCE_MARGIN btScalar(0.04)’ to ‘#define CONVEX_DISTANCE_MARGIN btScalar(0.00)’.
(2) after the above change, the nornal is wrong when the distance between getPositionWorldOnA and getPositionWorldOnB is smaller than 10e-6.
By the way, what is differences between CONVEX_DISTANCE_MARGIN and m_collisionMargin in the btCompoundShape.h?
Thank you in advance
Xuhai Tang