Skip navigation
Currently Being Moderated

creating Cloth

Oct 2, 2011 7:32 PM

Tags: #cloth #createcloth #createclothresource

I must stupid but I have been following the instructions at http://help.adobe.com/en_US/Director/11.5/Beginners/WS16484b78be4e1542 207b595813093835e2c-8000.html on how to create a cloth.

 

The instructions on that page are:

member ("physics").createclothresource(modelref, [flipNormals])

member ("physics").createcloth(clothname ,clothres, clothmodel, density,thickness)

 

So I have set up a 3d world member with a single mesh model and inserted a physics object I called "physics".

 

Next I've set up a behaviour for the 3D member following the instructions from that link above.

 

"On beginSprite(me)

 

sp = sprite(me.spritenum)

mem = sp.member

modelRef = mem.model("plane")  -- this a single mesh model

 

gDensity = 2.0

gThickness = 1.8

 

a = member("physics").createclothresource(modelref) 

member ("physics").createcloth("banner",a, modelRef, gDensity,gThickness)"

 

However Director alerts an error everytime it encounters the line "a = createclothresource(modelRef) " saying "Error - Script Error -21".

 

Can anyone tell me where I am going wrong?

 

Many thanks

Art

 
Replies
  • Currently Being Moderated
    Oct 3, 2011 4:10 AM   in reply to realm-smart

    You need to add the meshDeform modifier to your model to allow Ageia access to the geometry:

     

    modelRef.addModifier(#meshDeform)

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points