Local rotation in simple rig

Hi All,

Just starting out with rigging and have some working but I’m stuck on this scenario, and I know I’m going to kick myself, but I’ve been struggling to get this very simple rig working and I just can’t figure out what I’m doing wrong could someone help me understand.

I’ve set all the constraints in local space (I think) and aligned the empties with the mesh I want to rotate everything works as I would like I just want to drag the Turret.Spinner.Controler left and right in the x axis and have the turrets spin on their local axis as they do in the attached file, until I parent the empties I’m spinning to the Master Empty as I want everything to move together in the real thing (I’ve just parented Ship-Turret.Spinner.1 in the example file to show the issue) at which point it appears to either be picking up world space or something else and spins it on a different axis. I’ve tried all sorts of variations and reading but I just can’t get my head around what’s going on. My understanding is I should be able to so this simple stuff without armatures ? or so I need to use them.

Basic.Rigging.Test.blend (936 KB)

any pointers appreciated, I’m sure it’s something stupid I’ve overlooked but I can’t for the life of me see the wood from the trees at the moment !

“I just want to drag the Turret.Spinner.Controler left and right in the x axis and have the turrets spin on their local axis as they do in the attached file.”
Im not following.
if they do so in the attached file what is wrong? In the file there is a copy rotation. so they spin at the Tspinner spins.
What are the empties for?
I PARENTED THE LITTLE SHIP TURRENT 4 to the box and removed the empty and added a driver to rotation on the z I made the turret spinner the driver on the x axis local space
Basic.Rigging.Test.blend (909 KB).
If the box is a ship the drive and turret follows and only spins when the drive moves on the x axis.
I hope i got close to what you are looking for.

Thanks so much for responding kazinger, I had added the empty just because in my head I thought it would be better to try and separate the mesh objects from the mechanics, I knew they were superfluous, I’m still working out the correct way to approach things.

I need to look at what you did in detail and have a read up on drivers I’ve not used those yet but wanted to say thanks for the response. I’ll come back after I’ve understood it!

I attached a screen shot to give it some more context as to what I was trying to do (very much work in progress!), you see the turret is at a weird angle off the surface that’s what I’m struggling with I can get it parented and spinning vertically on the global z but when I try and angle it and spin it locally when parenting to the master empty is when I run into trouble as in my example file, does that make sense ? I wanted to be able to rotate all 4 turrets together which is why I had that one empty I was copying rotation from

Anyway I’ll have a good look at what you did tonight and see if I can get my head around it before asking any follow up questions and thanks again!

Mark


Drivers are just a few simple steps ( in your case).
the objects are modeled well so you axis are fine.
N key to open properties menu. right or middle click on z rotation and ad a single driver.
In graph editor change from f curve editor to drivers.
Click on z rotation and press n key.
Under object put what is to be the driver, what you use to control the drive or rotation. change from world space to local. Change scripted expressions to averaged value. and your done.
Just parent the turret to the ship if that works for you.
PM me if I can help.
Nice ship!

Thanks! I still didn’t get quite what I wanted however you got me thinking and 1) I now get drivers to a certain degree and are they going to be useful in the future and I can code a bit as well and 2) I’ve learnt a lot more about local and world space as a result :slight_smile:

I ended up doing it all with constraints, I’ve uploaded the file for completeness Basic.Rigging.Test-3-noparent.blend (954 KB) if anyone else runs into the same problem, what I ended up doing was using the child of constraint instead of parenting to the master then the copy rotation constraint worked as expected and I can move and rotate the master with the turrets following but they stay rotating in local space.
I think then I parent with ctl P the local space of the parented object must inherit from the parent and so when I was trying to apply rotation from a different object it was applying the rotation to that causing it’s local space to get calculated differently causing it not to spin on the original local axis (I’m guessing here but that’s what it looked like) When I use the child of constraint and set inverse then although it looks like it’s acting like a normal parent all my local constraints stay working and it behaves as I want so happy days! Can get back to texturing it now :slight_smile:



too many constraints too complicated. Just use one driver. no constraints on the controller. just press the lock icon in transforms location.

Thank’s another go :slight_smile: just with drivers, it’ working and gives me much more options with scripting etc if I need it but I still had to do some fiddling and add the emptys back to get what I wanted, am I missing something obvious or is this the correct way to do it.

My issue is the turrets need to be at that angle and spin on the local axis and all move with the master both location and rotation as it moves in world space, if I just add a driver mapping from x location of the controller to z rotation of the turret then it sets the z rotation to the x location which is 0 to start with and does that in the global word space so it doesn’t make the additional adjustments to x and y rotation in global space to maintain the local equivalent so doesn’t work as I need and the turret ends up at a funny angle relative to the master

If I parent the Turret the master directly I get the same issues because the initial value of the x location for the driver is 0, if I apply the transform to the turret then parent it doesn’t work because now up is global and spins it around that causing same issues.

So, if I make a note of the global x,y,z rotation of each of the turrets which is where I want them to always start, then align all the turrets back to x,y,z 0,0,0 on global, create an empty at the origin of each turret rotation 0,0,0, parent each turret to the respective empty then apply the original turret rotation to the empty I now have my turrets all pointing where I want them but the turrets are still 0,0,0 in local space. Then I can parent the emptys to the master, so far so good.

Then I can add a single driver from x location from the controller to z rotation on the turret directly (not the empty) nothing jumps as both source and destination are 0 around and the turret spins in it’s local space regardless of the location or orientation of the master parent.

Is that better :slight_smile: thx for keeping taking the time to come back, I will get there, just need to get my head around this bit properly for my own sanity.

Basic.Rigging.Test-3driver.blend (1.05 MB)