Forum

This forum is for swapping tips or ideas with fellow users, suggesting new features, or showing of what you have created with the system etc, there is no guarantee of an answer to questions posted in the forum. All support questions must be submitted via the Support ticket system

Welcome Guest 

Show/Hide Header

Welcome Guest, posting in this forum requires registration.





Pages: [1]
Author Topic: manual creation of FFD4x4x4
melligeorg-
iou
Newbie
Posts: 1
Permalink
Post manual creation of FFD4x4x4
on: June 10, 2012, 02:31
Quote

Hi there,

First of all, this is an amazing extension, but unfortunately I've run into some trouble ..

I've got an engine that creates a custom 64 length Vector3 array so I can pump into the FFD4x4x4, I've got my script replacing the points like this:

ffd.pt = ffd.morphPoints;

This works fine, but of course it does't update - if I change the Knotdetail on the inspector, the values update correctly because it triggers the OnGUI changed I'm guessing.

Now, If I try to call modObj.MeshUpdated(); right after I've setup the points, everything goes crazy and breaks, which is strange. Likewise, if I try to manually create the ffd from scratch with something like the below, it's even worse, the model becomes invisible ( i.e. broken again ):


function Start(){
   
  var mega :  MegaModifyObject = gameObject.AddComponent(MegaModifyObject);

   var mod : MegaFFD4x4x4 = gameObject.AddComponent(MegaFFD4x4x4);
   mod.pt = morphPoints;

   mega.MeshUpdated(); 

I know the morph points are correct because when I update the FFD inspector manually after replacing the ffd.pt with the snippet at the top, the values update and the model looks great. I just can't seem to find a way of getting to work programmatically.

Thanks in advance for your help, I really need to get this to work!

- Mel

Pages: [1]
Mingle Forum by cartpauj
Version: 1.0.34 ; Page loaded in: 0.012 seconds.