Jump to content

joint coordinate system


Recommended Posts

I can find this about the "secondaryAxis" of a configurable joint:

"Together, Axis and Secondary Axis define the local coordinate system of the joint. The third axis is set to be orthogonal to the other two."

That's great... but does say nothing. Is the axis the x-axis and the secondaryAxis the y-axis or (what could also be) is the secondaryAxis the z-axis or maybe between the x-axis and the y-axis with a 30° angle between them? I mean... such documentations are crap. That's like writing all the ingredients for a cake on a paper and not telling what to do with them.

Does somebody know that? ... I don't want to guess... I hate when I have to guess! ... sorry for that, but... really...

Rudolf

 

Link to comment
Share on other sites

2 hours ago, Rudolf Meier said:

I can find this about the "secondaryAxis" of a configurable joint:

"Together, Axis and Secondary Axis define the local coordinate system of the joint. The third axis is set to be orthogonal to the other two."

That's great... but does say nothing. Is the axis the x-axis and the secondaryAxis the y-axis or (what could also be) is the secondaryAxis the z-axis or maybe between the x-axis and the y-axis with a 30° angle between them? I mean... such documentations are crap. That's like writing all the ingredients for a cake on a paper and not telling what to do with them.

Does somebody know that? ... I don't want to guess... I hate when I have to guess! ... sorry for that, but... really...

Rudolf

 

For main axis enter a vector.

For secondary axis, enter a second vector.  This should be orthogonal to the first vector (but is not limited to being so).

The third axis is calculated for you from Vector3.cross(first, second).


While much in the unity joint documentations was very confusing, I didn't find the axis stuff to be part of it.

Link to comment
Share on other sites

On 9/25/2017 at 10:16 AM, Rudolf Meier said:

Yeah, but what direction does a joint rotate to if I allow him to rotate on it's x axis? That's the question the documentation doesn't answer.

Primary axis sets the 'up' direction (Y).  Secondary axis sets the 'right' direction (X).  The third unspecified axis would be forward (Z), calculated from the other two.

(Found that info by <30s of playing in the Unity editor)

The rotation would be using -joint coordinate space-, and would rotate around the 'secondary' axis (whatever that might be when transformed to object-local or world-space).


Edit:  Should add that Unity joints are an absolute mess trying to figure them out.  They can also be configured for pretty close to any kind of setup, so the configuration can vary quite a bit depending on the intended use.  I'll try to come up with some more... pointed... instructions on how to setup, for example, a simple spring or hinge (using the configurable joint).

Edited by Shadowmage
Link to comment
Share on other sites

I found out (in a tutorial video, after watching it 3 times :-) )... that you should set the axis to your rotation axis and the secondary to one that is perpendicular to it (in my case I guess I don't care about this axis... but I'm not sure yet). And then you should rotate around the x axis (the axis of the joint defines the x-axis of the joint's rotation and movements) ... and you should set the axis to the rotation axis, because like this it is the x-axis and the x-axis has the most possibilities in terms of settings and options of the movement... (that's the only reason to do that... you could rotate around all axis, but with less options... so, e.g. you cannot defined such fine restrictions or things like that)

I hope that is correct what I wrote...

But right now it seems that it's working... my only remaining problem is, that the thing doesn't seem to rotate around the anchor point... but when the rotation stopps, it snaps to it... so... I must have made some config errors here...

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...