Jump to content

Break wire off geometry if at certain angle


Mala

Recommended Posts

Hi, 

 

I'm trying to create an expression in Houdini's Hscript to break the wires off the surface off an object when they reach a certain angle.

 

so far I have this

 

for i=0 to $P step 2
 
    set even = "$i"
    set odd = "$even+1"
    
    while ($F == 0)
    set vec_normal = "odd.$P - even.$P " # find vector at frame 0
        # echo vec_normal
    end
 
    while ($F > 0)    
    set vec_moving = "odd.$P - even.$P" # find vector at other frames
        # echo vec_moving
    end
    
    if (vangle(vec_normal,vec_moving) > 40)
        echo null
    else
        echo even
    endif
    
end
 
but it doesn't work...
 
I was wondering if anyone could help me with this?
 
Thanks in advance!
Link to comment
Share on other sites

  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...