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 
finalPnts, but I'm not sure what happens from there.

Have you tried printing out the old and new locations of each point (in 
world space and/or local space)? 
Have you confirmed that values set in finalPts are actually used to set 
positions of vertices in the output mesh?

On Friday, 21 December 2018 11:26:23 UTC+11, Fleming Lin wrote:
>
> hello internet....I have been working on this collision deformer node for 
> a long time and still cant get it right....I have done many research and 
> even ask people for the reference code but IT JUST WONT WORKS!!!!!!!!...
>
> the big idea for my collision deformer is
> first do a intersection test between the collider bounding box and 
> deformer bounding box
>     if intersected, check if the collider bounding box contain the 
> deformer vertex( in world coordinate)...
>       if contained, do allintersection test for the vertex to see if it is 
> inside the the collider mesh or not , using   
>                (if (hitPoints.length() % 2 == 1))
> and then do the deformation and save the point to the finalpnts array( 
> used later to set all positions )
>
> for debugging purpose I asked the maya to print out the collision point 
> index, and it works fine, but the deformation algorithm I have in that same 
> if loop just wont works........I have no idea why and really ran out of 
> idea..please help....
>
> here is the test result
>
> [image: internet_help.PNG]
>
>
>
> here is the c++ code I have.
>
> https://github.com/fleminglin/sos/blob/master/flinCollide.cpp
>
>
> sincerely
> flin
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/e6e1604d-dc46-4365-9588-56389618982c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to