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
|