2
$\begingroup$

enter image description here

I have rigged train wheels, and it works, except when you rotate the train. The piston's "Copy Location" is using world space instead of local space, which causes it to go all wonky.

enter image description here

I tried every combination of "Local Space" and "World Space" on the "Copy Location" constraint, but nothing works.

blend file: https://drive.google.com/open?id=0B9fajYcxL7pvUWF4T0tRZHdLcFU

$\endgroup$
2
$\begingroup$

I tried changing "piston" constraint settings a bit, setting

  • world <==> world
  • adding X as contraint axis

then I animated the train rotation, to check and it seems to work now,

enter image description here

see the attached file. (btw, next time please use the same service I used, here http://blend-exchange.giantcowfilms.com/, it helps preserving example files for others in future).

edit: as you say in commenmts, there were other issues on different train's movements.

I tried and probably you just need to add also Z axis to the piston contraint, and then ALSO add a location contraint for piston on Z, limiting max Z to its "deafult" Z location in local space, like this:

enter image description here

and it seems to behave well (hopefully) on all desired train movements...

enter image description here

$\endgroup$
  • $\begingroup$ Thank you. This works for driving side to side, but not if the train goes up or down a hill. Is there a way to make constraints relative to the local space of the train? So they always line up with the parent, no matter which way the parent moves? $\endgroup$ – Xuan Jun 13 '17 at 15:13
  • $\begingroup$ I have tried moving the train also up or down, it seems to work here... can you provide an example file where you show this happening, it will be easier to check all needed movements... $\endgroup$ – m.ardito Jun 13 '17 at 22:39
  • $\begingroup$ By up or down, I mean whole train rotating on the X axis (causing the front and back of the train to go up or down, e.g. going up a hill). Example GIF here: drive.google.com/open?id=0B9fajYcxL7pva2JMNGxfUzVDZFE And if I check the Z axis, the entire piston moves up and down like you would expect. Example GIF: drive.google.com/open?id=0B9fajYcxL7pvLWJWbHJNRUJnRDQ And here is a blend file as requested: blend-exchange.giantcowfilms.com/b/3401 $\endgroup$ – Xuan Jun 14 '17 at 4:46
  • 1
    $\begingroup$ I just edited the answer, it seems adding Z and adding another contraint could work... let me know if you need an updated example file. $\endgroup$ – m.ardito Jun 14 '17 at 7:30
  • $\begingroup$ Wow, that works! Thank you so much! I been working on that for days. I can't say I understand it (strange that copy locations are in world, but still follows the local rotation of the train but the limit location is in local space) , but I glad it working! $\endgroup$ – Xuan Jun 14 '17 at 18:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.