[Maya-Python] Re: collision deformer SOS pls..pls..pls help this child....

2018-12-21 Thread Fleming Lin
hi Michael! I just used the default MItGeometry that was provide in the deform method to set the final positions and everything works perfect now! My original intention was to used a different way set the final result, but I guess I was over complicated the code by doing this whole

[Maya-Python] Re: collision deformer SOS pls..pls..pls help this child....

2018-12-20 Thread Michael Boon
I have to admit I haven't written a modifier before and I don't see anything obvious wrong with what you've done. It seems strange that you are using a MItGeometry outIter to set the positions. It would seem more direct to me to set the positions on your MFnMesh fnOutmesh, which controls

[Maya-Python] Re: collision deformer SOS pls..pls..pls help this child....

2018-12-20 Thread Michael Boon
We're not making sense to each other here :) Are these points all where you expect them to be? - deformerWorldPnt - collisionPoint - finalPnt It might be worth colliding one cube against another, just because it's much easier to do the math in your head and know when the results are what you

[Maya-Python] Re: collision deformer SOS pls..pls..pls help this child....

2018-12-20 Thread Fleming Lin
hi Michaek, thanks for taking time reading my code... and the problem here is my code doesnt move the corresponding point on the deformer surface(sorry I should be clearer at the beginning) in other words, nothing happened at all when I collide them(and this is the part drive me crazy, it's

[Maya-Python] Re: collision deformer SOS pls..pls..pls help this child....

2018-12-20 Thread Michael Boon
What is not working? Your code finds the correct points, and prints out the correct indices, but it doesn't move them correctly? So what is it doing wrong when it moves them? Is it not moving them at all? Moving them to the wrong place? I see you calculating finalPnt and then entering it into