4
$\begingroup$

I added shrinkwrap constraint to an yellow sphere which is a Child to an empty object, with an arrow constrained to it, as a child object. The empty object follows along a sinusoidal circular-curve.

The setup:

Here is an file for you to demonstrate this with. https://drive.google.com/file/d/1LFY7B84YFaYMNpntVDsAWe4lqTM3_Msh/view?usp=sharing

$\endgroup$
1

1 Answer 1

4
$\begingroup$

If you want the object to cling to the surface of an object and rotate to be in line with that object's normals, give it a shrinkwrap constraint with "Align to normal" enabled, with the proper axis you want aligned to the normal:

enter image description here

If we want the object to acquire only rotation based on the nearest normal, without changing its position, we can sandwich in a parent that gets the proper location, give it a new child that shrinkwraps, then have our original empty copy world space rotation from that new child:

enter image description here

$\endgroup$
4
  • $\begingroup$ Um I am not sure if I understood the answer but i tried enabling the shrinkwap option Align to Normal and it is all glicthy now Here is the link to a new file: drive.google.com/file/d/1LFY7B84YFaYMNpntVDsAWe4lqTM3_Msh/… $\endgroup$ Feb 4, 2022 at 20:06
  • $\begingroup$ I don't believe you linked the right file. There's no object with a shrinkwrap constraint in that file. $\endgroup$
    – Nathan
    Feb 4, 2022 at 20:09
  • $\begingroup$ the yellow sphere has one also play the animation too to see how it goes wrong, the arrow is supposed to normal to the surface $\endgroup$ Feb 4, 2022 at 20:11
  • $\begingroup$ Oh, pardon, I see it. First, don't use project, which will move it differently. Use nearest surface point, the default, and what's in the pic. Second, look at the spheres' axes. If you are expecting the arrow to also point in the direction of the curve's normals, it won't, because the arrow is not aligned with the sphere's Z axis-- the axis you're aligning with the normal. Keep in mind also that you are shrinkwrapping to nearest surface, and if you want that to be the top, keep the constrained object well on that side of the object. $\endgroup$
    – Nathan
    Feb 4, 2022 at 20:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .