Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / Position script controller
  RSS 2.0 ATOM  

Position script controller
Rate this thread
 
37503
 
Permlink of this thread  
avatar
  • mrspyke
  • Posted: 07 December 2009 01:44 AM
  • Total Posts: 2
  • Joined: 27 December 2006 05:39 PM

I’m trying to make an animation from a prop with a piston There for i have a postionscript controller to make form a rotational moment a vertical movement. but when i start to rotate the whole rig the movement is getting smaller because there isn’t referring to the world access.
can I make this script working on a local base.

Script example:

dependsOn $Point01 $Point_Anchor

posX = $Point_Anchor.position[1]
posY = $Point_Anchor.position[2]
posZ = $Point01.position[3]

[posX, posY, posZ]

--[ 0, 0, 0 ]

Max 2010 X64 - Vray 1.50 SP4 - Dual Quad Xeon E5410 - 4GB - Quadro FX 1700



Replies: 0
avatar
  • Location: West Midlands, England, UK
  • Total Posts: 14445
  • Joined: 06 August 2007 11:06 PM
  • Permlink of this post

Firstly - what version of Max? “dependsOn” has been deprecated (shouldn’t be used) for quite a few versions.

Rotations are, I believe, local (but a pain to get right in script), positions are relative to the world by default - just as if you had moved it in the viewport.

Look up “coordsys” in the help for changing those.

2 Tips.
Put your Max version (and brief system specs) in your sig - saves us asking.
Always put code in CODE tags - the forum display messes with it if you don’t.



Max 4.2 through 2013.
XP-64 (SP2)
NVidia 9800GTX-512 (Driver 266.58).
Core 2 Quad Q6600 2.4GHz, 8Gb Ram, DX9.0c.

Replies: 0