Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Manipulated on the local axis within the controller script?

6 REPLIES 6
SOLVED
Reply
Message 1 of 7
dg3duy
721 Views, 6 Replies

Manipulated on the local axis within the controller script?

Sample scene 

I wonder how it can be manipulated on the local axis within the controller script?


script controllers.gif

6 REPLIES 6
Message 2 of 7
denisT.MaxDoctor
in reply to: dg3duy

use the position script controller as second controller of Position List controller.

Message 3 of 7
dg3duy
in reply to: denisT.MaxDoctor

The result in this case is the same if I place the script in the second place in the list of controllers, I hope I understood the answer.script controllers 2.gif

Message 4 of 7
denisT.MaxDoctor
in reply to: dg3duy

Oh. I didn't read your question carefully ... so maybe this will work for you:

 

delete objects

target = circle name:#target radius:10 wirecolor:red isselected:on
source = point name:#source size:10 box:on axistripod:on cross:on wirecolor:green

p = source.pos.controller = position_list()
p.setname 1 "Main Pos"
c = p.available.controller = position_script()
p.setname 2 "Driven Pos"
c.addobject #rot source.rotation.controller
c.addnode #pos target
c.setexpression "[pos.pos.z, 0, 0] * rot.value"

 

 

Message 5 of 7

the solution may be different. it depends on what exactly you want to do ... it is more likely that it is better to move in the parent coordinate system rather than in the local

Message 6 of 7


@denisT.MaxDoctor wrote:

the solution may be different. it depends on what exactly you want to do ... it is more likely that it is better to move in the parent coordinate system rather than in the local


 

delete objects

target = circle name:#target radius:10 wirecolor:red isselected:on
parent = dummy name:#parent
source = point name:#source size:10 box:on axistripod:on cross:on parent:parent wirecolor:green

c = source.pos.controller = position_script()
c.addnode #pos target
c.setexpression "[pos.pos.z, 0, 0]"

move parent [0,20,0]
rotate parent (eulerangles 0 0 45)

 

Message 7 of 7
dg3duy
in reply to: dg3duy

Very good examples, now I have to see which of the 2 I am going to use.
Excellent contribution as always! thank you very much

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report