3ak
@3ak
New Member
Joined: Feb 14, 2024
Topics: 2 / Replies: 68
Reply
RE: Align an axis to a plane, using other axis?

thx) i don’t know how TS will use it so maybe it has sense) a bit offtopic: do you know why sometimes the only way to compare values is as strings? I…

13 years ago
Forum
Reply
RE: Align an axis to a plane, using other axis?

Why incorrectly? Rotating X around Z to align X to plane results in different vector than rotating X around Y to align with the same plane: and TS a…

13 years ago
Forum
Reply
RE: Align an axis to a plane, using other axis?

but task is to align to plane rotating around given axis. you can align X axis to plane XY of second object rotating around both of the remaining axi…

13 years ago
Forum
Reply
RE: Align an axis to a plane, using other axis?

and whts wrong there?) it alignes to plane perfectly. The reason it rotates is cause planeNormal and axis of rotation are the same and cross prod = [0…

13 years ago
Forum
Reply
RE: Align an axis to a plane, using other axis?

Malkalypse. this should work without dot prod check: fn rotateToAlign obj rotatedAxis rotationAxis planeNormal = ( if rotatedAxis != rotationAxis th…

13 years ago
Forum
Reply
Forum
Reply
RE: Align an axis to a plane, using other axis?

You wrote that my func returns different results. i created box, plane, rotated them randomly, run my script. it aligned box to plane (let’s say rotat…

13 years ago
Forum
Reply
RE: Align an axis to a plane, using other axis?

denisT: here is what i would do: fn makeRotateMatrix vector angle = ( x = vector.x y = vector.y z = vector.z cs = angle sn = sqrt …

13 years ago
Forum
Reply
RE: Align an axis to a plane, using other axis?

Malkalypse: Yeah, I actually noticed that not long after I posted… Any suggestions for fixing it? (oh, and 3ak: I’m not the one who broke it this …

13 years ago
Forum
Reply
RE: Call Function from external script file

fileIn works fine for me. try include instead

13 years ago
Forum
Reply
RE: Why this error?

Cause Material op in that event try to apply material to particles but they don’t have UVs. Create UVs first with Mapping, Mapping object, script etc….

13 years ago
Forum
Reply
RE: Align an axis to a plane, using other axis?

i know – the main problem is to find which direction to choose) one more problem is rounding in 3ds max – sometimes it differs in 0.00001 and my test…

13 years ago
Forum
Reply
RE: Align an axis to a plane, using other axis?

I don’t know why but: so they are equal but last line return false. Even comparing them as strings returns true.

13 years ago
Forum
Reply
RE: Align an axis to a plane, using other axis?

here is 105th version)) tm1 = $Box001.transform tm2 = $Plane001.transform rotAxis = normalize tm1.row2 rotdAxis = normalize tm1.row1 axis3 = cross …

13 years ago
Forum
Reply
RE: Align an axis to a plane, using other axis?

its interesting) could you please share your scene where it doesn’t work, and what rotations you’re after and i’ll try it.

13 years ago
Forum
Page 4 / 5