|
UsagephysicsWorld.addProxyTemplate(3dmember, proxyTemplate, string proxyname)
DescriptionAdds
the proxy template created using createproxyTemplate() method into
the specified 3d member.
Parameters
Parameter
|
Description
|
3dmember
|
Required. A reference to the 3d cast member.
|
proxyTemplate
|
Required. The proxytemplate is created using
createProxyTemplate().
|
proxyName
|
Required. The name in which the proxy must
be saved.
|
A return value 1 on success and 0 on failure.
This
method adds the proxy Template created using createProxyTemplate() method
to the specified 3dmember.
A new model resource of type
#physicsmesh is added to the 3dmember.
Note: The
addProxyTemplate() method only adds the proxyTemplate as a newModelResource
#physicsmesh in the specified 3d world member. To save the newly
added proxy, either the saveWorld() or saveW3d() method has to be
called.
Example--Lingo syntax
member("PhysicsWorld").addProxyTemplate(member("3dWorld") , ProxyTemplate, "saved_proxyTemplateName")
--creates a modelresource of type #physicsmesh in the 3d world specified.
--modelresource("saved_proxyTemplateName").meshtype gives the type of physicsmesh . i.e #concave and #convex.
--Use saveWorld() or saveW3d() methods to save the proxy added to the 3d world.
-- member("3dWorld").saveW3d(the moviepath & "proxyWorld.w3d")
// JavaScript syntax
member("PhysicsWorld").addProxyTemplate(member("3dWorld") , ProxyTemplate,"saved_proxyTemplateName");
Note: Best
practice is to save the proxy template using the message window.
|
|
|