Jump to content
pan.mentolka

random rotarion added to the each Y axis

Recommended Posts

Hi people!

Justa superquick issue B)

I need to keep the normal direction of the point, so all the heads will be oriented along the normal direction. BUT I would like to randomize their rotation around the Y axis, so they should not be all "looking straight up" but they should be ALL randomly rotated along each of their Y axis. I hope this explanation does make a bit sense. :rolleyes:

I am attaching the file.

Thank you so much for any advice guys!

rotY_issue.hipnc

rot.JPG

Share this post


Link to post
Share on other sites

Hi,

You can write something like this to add some random rotation around N:

float angle = radians ( fit ( rand ( @ptnum + ch("seed") ), 0, 1, -360, 360 ) );
@rot = quaternion ( angle, normalize ( @N ) );

image.thumb.png.a559170fa5ac0255e244f3fe107ed30f.png

Make sure the geometry to be copied is aligned to Z axis though.

VcpwTuL.gif

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×