Notifications
Clear all

[Closed] SetBipedRot Sets #QNAN

Ben,

I’m fairly slow so bear with me – I think I understand your basic approach, but it seems to me the “trick” would be to get the helper objects aligned properly, correct? Or is aligning the helpers really straightforward? (Because it sure ain’t straightforward trying to parse the rotations from the other rig).

The other problem (and perhaps it’s only a problem in my mind :>) I see is does it matter what direction the rig is facing in? If you parent the helpers to the other rig won’t matching directions be critical as that rig moves? Or maybe I’m just not seeing the whole picture.

The other rig isn’t my own so I don’t have a lot of ability to even understand how it’s set up. But your approach certainly sounds promising and I’d love to know about aligning those helper objects and any other info you can provide.

Ok, Mike – I’ll post some more details for you – but I’m on vacation right now so I don’t have access to my code. I’ll post that stuff when I get back in a couple of days.

-Ben

Hey, enjoy your vacation! Don’t think about this kind of stuff now!

If you think about it when you get back, I’d appreciate any more info you can provide.

Well, I can’t stand it. I hate to bother anyone on vacation, but since you appear to be checking here from time to time maybe you’ll take pity on me.

I tried to do what I think you’re doing and it “sort” of works, which is what is frustrating to me. I created three dummy objects (for a test) aligning them with the thigh, calf and foot on the right side, and then linked them to the other rig’s corresponding parts. The alignments are correct insofar as pivot points go – that is, the biped parts have the same pivot directions as the dummy parts.

When I try and copy the rotations over they work but somewhat in reverse – that is, the leg rotates backwards but the other rotations seem correct IF the leg wasn’t backwards. But that’s worse than if they were completely reversed, in that I could correct for that by doing an inverse.

Near as I can figure (and I can’t) I’m either putting the alignment of the dummys wrong, or I’m copying over the rotations incorrectly. Here is what I am doing to copy:

Myauto1 = $‘dummy03’.transform – get the dummy transforms
mybip = $‘bip01 r foot’.transform – only change rotations and not position
mybip.row1 = myauto1.row1
mybip.row2 = myauto1.row2
mybip.row3 = myauto1.row3
$‘bip01 r foot’.transform = mybip – copy the information to the part in question

thisrot = biped.gettransform $‘bip01 r thigh’ #rotation – now get the rotation
biped.settransform $‘bip01 R Thigh’ #rotation thisrot true – set the rotation with a key

I don’t know how else to set Biped rotations and not position so that’s what I’ve been doing. And, as I said, it seems to kind of work if I had things sorted out correctly. Which I don’t.

So if any of this rings a bell (or if anyone else wants to jump in here) I’d be eternally grateful. But I can indeed wait until you get back from vacation (my grandkids are coming Tuesday and I might be rather busy myself for the next week).

Biped rotation transforms are the inverse of standard rotations, so you have to invert them. I stumbled on that one a bit too until I found the solution in the documentation. You can just do r = bipedpart.transform.rotation and then do helerpoint.rotation = inverse r. That should do it for you – although the syntax might not be right. I don’t have the docs here to look it up.

-Ben

Yes, I’ve tried inverting, but perhaps I’m not inverting at the right point. I’ll keep banging away at it and perhaps after you get back from vacation you can look at your code and help further.

I really appreciate all this, though.

Page 2 / 2