我这里有关于Virtools软件的介绍文章一部分,麻烦哪位高手帮我翻译一下!!
14.Spring Constraint
This turorial shows you how to use springs to create an elastic lin between physics objects in your composition.
Note:Springs aren’t really constraints,but more actuators like motors or forces.But as they’re mostly useb to link objects together,it make sense to consider them as constrains(mostly because sometime,you could also use them additionnaly to a constraint to simulate,for instance,a jack).
14.1 Open Tutorial Start File
Open the tutorial file Springs.cmo. The top carton will be fixed while the bottom carton while the bottom carton will fall.
In the Schematic,note that both cartons are controlled by the Physicalize BBs located in the fixed carton script.While the first Physicalize BB applies to the top carton,the second Physicalize BB has a Target pIn poiting to the moving carton.
Also,note that the same topology(Surface Name)is used for both cartons(via the pLink).Since the Surface Name is the same for both BBs,the moving carton will automatically have the same physics surface as the fixed carton.Since the physics surface is created by the first Physicalize BB(attached to the fixed carton),the Convex Mesh pIn for the Physicalize BB attached to the moving carton is irrelevant and is,therefore,left at the default setting(NULL).
14.2 Create a Stiff Physics Spring
To create a physics spring between two physics objects,you need to attach the Set Physics Spring BB to one of the physics bojects.
32. In the Schematic,add the Set Physics Spring BB(Physics/Creation)to the Carton Fixed script.
33.Edit the pIns for the Set Physics Spring BB:
Object 2=Carton Moving
Position 1=(-1,-1,-1)
Referential 1=Carton Fixed
Position 2=(-1,-1,-1)
Referential 2=Caron Moving
Leave all other pValues at their default values.
Position 1 and Referential 1 define the first anchor point of the spring,linked to Object 1.
Position 2 and Referential 2 define the second anchor point of the spring,linked to Object 2.
In this example,you know the exact dimensions of the carton objects(1 x 1 x 1)and it is easy to set the positions of both anchors numerically.However,it is not always this easy,so don’t hesitate to use 3D Frames to help you define those positions in the 3D Layout.