Linking Problem


#1

to simplify the problem
i have a box and a sphere
i want the sphere to always rotate around the box as center point
while keeping both objects not translation dependant on each other so i can move both freely and animate them
i tried linking the sphere to the box and uncheck the x,y,z inherent ( link info ) but it keeps rotating around 0,0,0 world

any help on this please ?


#2

Make a dummy, align it to the box, link it or wire the rotation parameters. Link the sphere to the dummy. Now the sphere will rotate with the dummy, around the box, but you will be free to move it wherever you want.


#3

P1=Point pos:[0,0,0]
D1=Dummy pos:[-100,0,50]
D1.parent = P1
offset_ = D1.transform * inverse P1.transform
D1.transform = P1.transform
D1.objectOffsetPos = offset_.translation
D1.objectOffsetRot = offset_.rotation
D1.objectOffsetScale = offset_.scale
setInheritanceFlags D1 #{1…3, 7…9}

Use for P1 Box and for D1 - Sphere)


#4

unfortunatly if i moved the dummy the sphere will move with it because of the link
i need each one to not be translation dependant


#5

unfortunatly the point also moves when i move the dummy so they are dependant


#6

isn’t there a way through maxscript to make an object’s pivot always equals another object’s pivot ?
if that is doable i think that would solve the problem


#7


#8

Screenshot%202022-09-28%20205438

i get this error


#9

i also tried doing it using this code

when transform $Sphere002 changes do ( $Sphere002.pivot = $Box001.center )

which works great and even keeps updating even if Box001 is animated

however there is only one problem is that when i try to move the timeline bar i get these errors

Screenshot%202022-09-28%20202243

Screenshot%202022-09-28%20202257


#10

its not PRS controller. its CATHDPIVOTTrans controller


#11

You can just aplly this type of controller to your object and Animate pivot when you need by click on Sub-Object button on Motion panel


#12

thnaks @Eugine_M i think am almost there

the only problem right now is the when i try to move the dummy is speeding very fast not normal move
like if its multipled by a increasing factor

i move it one grid by mouse it moves like 10 grids


#13

why when i unckeck the x y z movments in the inheret panel ( link info ) it rotates around world zero coordinates is there a way to override that ?


#14

any help please on this simple problem ?