Jump to content

Attract points to a mesh ?


CinnamonMetal

Recommended Posts

What I have done before is create a companion count match scattered onto the goal surface that can be used as goal points for a pop steer seek. The vex code inside the seek node boldly fetches points from elsewhere (via the string path) in the network and assumes the scatter point count matches the particle points count. This way each particle has a unique goal that it will be seeking.

// Here we setup a path to fetch points from anywhere in the scene.
string goal_path = "op:/obj/sphere_object_GOAL/OUT_GOAL_POINT";
// We can use @ptnum like this only because we have matched the particle count to the goal count prior to executing this code.
goal = point(goal_path,"P",@ptnum); 

 

ap_goal_seek_with_colliion.hiplc

Edited by Atom
Link to comment
Share on other sites

Thanks Atom, there is one thing, the points don't attract to the surface normals of the mesh; in your scene the sphere.  I'd like the points to attract to the surfaces or the primitives of the surface to which it's attracting too.

Crap, I realized something I'll add to my original post; if it's a different question I'll post a new thread but if someone wants to expand on this, I would appreciate it.

The POP Attract, can have points attract to a surface of a mesh.  How can I have a primitive points attract to a surface, rather then if the primitive has a point as a center which would cause the center point to attract to a point on a mesh ?

 

Edited by CinnamonMetal
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...