Is there a way to detect if a rotation was CCW or CW?


#1

I have spent few hours searching the net for solution, but nothing that I found can be marked as solution.

What is the problem:
1- in Top viewport, at position [0,-100,0] create a teapot.
2- put its pivot to [0,0,0]
3- create a copy of the teapod and rotate it 90 deg in clockwise direction
4- create another copy of the first teapot and rotate it 270 deg in counterclockwise direction
The new teapots will be at the same position.

Is there a way, after the new teapots are created, to find if they was rotated ccw or cw?


#2

If you assign a linear rotation or TCB rotation contoller to the teapot then

$Teapot02.rotation.controller.value
$Teapot03.rotation.controller.value

will give different results whether that’s a reliable cw ccw test your guess is as good as mine


#3

The objects(teapots) must not be modified in any way.

So I have to use a workaround or to read what is printed in the Maxscript Editor. :slight_smile:


#4

when you see a car parked on the street, how can you know that it has come either directly or in reverse? :wink:


#5

for your own tasks to solve this situation you can use List controllers where the first controller is initial position, and the another one (active) is an offset. In this case you can talk about “direction” of the offset


#6

No way. :slight_smile:
I thought that 3ds max may have some internal methods/functions to store the direction of last rotation.
When we rotate an object in the maxscript editor we can see something like this:

rotate $ (angleaxis -70 [0,0,1])
-- or
rotate $ (angleaxis 25 [0,0,1])

so we can see the direcetion of rotation. But… :slight_smile:

Thank you for letting me know that there is no such a hidden feature in 3ds max so I can stop searching it.


#7

maybe some kind of callback function that assigns a custom attribute to the object when rotated.
there is something in the help about event handling on transform, never used it myself

http://help.autodesk.com/view/3DSMAX/2017/ENU/?guid=__files_GUID_513285B3_DBF6_471E_B587_B5BE14D4D875_htm


#8

Thank you for the suggestion I know about the when construct and use it in some of my scripts, but I do not want to use it in this particular case.