- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm a newbie to maxscript/3DS Max so this might be an easy question but I'm struggling to get this to work.
I have an arm hinge that is connected to a base and can swing clockwise/counter-clockwise about the hinge point.
There is another small base to the left of the arm, where I placed a helper point Point013 - this point is fixed and cannot move.
An additional helper point named Point012 was placed on a connection hole in the arm and is constrained to that location of the arm - Point012 represents the connection point of an actuator that can extend vertically and rotate in the 2D plane and will follow and remained centered to the arm hole as the arm rotates.
Visual is below:
In my code, I need to calculate both the distance between Point012 and Point013, as well as the angle that their connection line forms with the horizontal plane.
Ideally this would then be used in a trackview for the distance calculation and another trackview for the angle calculation so that both can be programmed in an animation.
I have the (x,y,z) coordinates for both points and geometrically calculated the initial distance between the points at their initial position shown above, as well as the initial angle.
How can I write code that iteratively calculates the distance and angle between those points that I can use in a trackview to program the animation?
I'm trying to use the distance function at least for the initial calculation but when I do distance Point012 Point013 I get an error stating:
-- No ""distance"" function for undefined
-- MAXScript callstack:
-- thread data: threadID:2236
-- ------------------------------------------------------
-- [stack level: 0]
-- In top-level
Solved! Go to Solution.