Jump to content

Recommended Posts

Hello,

I'm working on a school project and I need to align a curve to the end of a line both in position and rotation. My goal is to be able to create a curve, anywhere in the scene, and snap the start of the said curve (point 0) to the end of the line. The end of the line is extracted with a carve node on the line itself, so nothing complicated here.

So far, I've been able to simply copy the curve onto the end of the line, but it only work with the position of the curve, not the rotation. It's important to note that I purposely created the curve in -Z axis. I know it will work if my curve is properly aligned in the Z axis, but I want my asset to be the most fail-safe possible.

That said, It would be very appreciated if someone could help me with this issue. There is a attachment showing my current network and what it looks like in the Scene View.

Thank you !

align_curve_line.JPG

Edited by anthonyblanchettepotvin
Forgot the attachment.
Link to comment
Share on other sites

Hi,

here is a quick and dirty approach using vex. You can draw your curve anywhere. The first vex node will make the curve x-axis aligned, so that the first and the last point are on the x axis and the end point is in point zero.

The second node will do a similar transformation (only reversed order) to make the curve match the lines start end end points.

curve_to_line.hipnc

Link to comment
Share on other sites

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...