Can a distance joint be set between two lines?

학술 2008. 11. 7. 10:58 Posted by 양고
Nvida PhysX 개발자포럼에 올린 질문에 그림을 링크하기 위한 글...
해당 포럼에서 .gif로 끝나는 깨끗한 링크만을 받아들이기 때문에 결국은 사용하지 못했던...

I want two lines (that belong to separate actors) getting closer, being connected by a rubber band. The rubber band (or spring) is tied to each line but can slide along the lines.
I drew a picture using visio and attach it here.


I think there will be a few ways to do it:

1. Put a point-on-line (POL) joint on each line, connect a dummy actor to the joint, and put a distance joint between the two dummy actors. Then the connection is:
actor with line - POL joint - dummy actor - distance joint - dummy actor - POL joint - another actor with line

2. Put a cylindrical joint on each line (for 1 sliding DOF), dummy object onto it, distance joint to connect two dummy objects.
Connection:
actor with line - cylindrical joint - dummy actor - distance joint - dummy actor - cylindrical joint - another actor with line

At first I thought connecting two lines with a distance joint will be enough, but the point on the lines must be fixed. Isn't there a joint that is a point-on-line joint and simultaneously a distance joint?

Any suggestion will be appreciated, thanks!