[QUESTION] Repulsive force direction in VDB evaluate_vertex_triangle_collision_force_hessian
I'm not sure I understand how the repulsive force works in evaluate_vertex_triangle_collision_force_hessian. Consider the case where we're computing the repulsive force for a particle in or near contact with a triangle (so v_order == 3 and v_bary == 1). The force will be applied in the opposite direction to collision_normal, which is computed as particle_p - closest_point_on_tri. If the particle is penetrating, that's fine, and the force pushes the particle away from the surface. It's notable however, that 'dis' is always positive, so a particle penetrating deeper than collision_radius will not receive a force. Further, if the particle's centre is not penetrating, but within a distance less than collision_radius outside the triangle surface, it seems to me that the force computed will actually attract the particle towards the surface.
Have I misunderstood the code, or is this intended behaviour?
Thanks! Cliff