Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
UDun
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: France
Posted: 4th Aug 2006 17:25
Hello,

I need some explanations about joints because it's quite hard to understand the vocabulary for a non-english user. Indeed, I'm lost with the words global anchor, local anchor, global axis, local axis, joint... because I don't know where are located all of these points and vectors in the 3D space. I'll try to illustrate this with pictures.


A/ REVOLUTIVE JOINT : PHY MAKE REVOLUTE JOINT ID, Obj1, Obj2, axisX, axisY, axisZ, X, Y, Z



1/ I use "Phy make revolute joint 1,1,2,0,1,0,0,0,0". I have made a joint on the Y axis at the point (0,0,0). Does this command illustrate what I wrote on the picture ?

2/ What is the name of this point (position : 0,0,0, axis : 0,1,0) ? Joint point ? Anchor point ?...

3/ About the axis X-Y-Z, we can use 1 for a full movement for the specified axis and 0 for no movement. Can we use values like 0.5, 0.75 ? If we can, how can we interpretate this : a half movement ...?



B/ REVOLUTIVE JOINT : PHY MAKE REVOLUTE JOINT ID, Obj1, Obj2



1/ When we use this syntax, we need to set some properties. Here, I'm a bit lost. What is the difference between a local and a global anchor ? Same question for a global and a local axis ?

2/ Here are the commands :
- phy set revolute joint global anchor : for object 1 and object 2
- phy set revolute joint local anchor : for object 1 and object 2
Each point has a local and global anchor but where are they in the 3D space ? Why do we also need a global and local axis for each object ?

3/ In my way of thinking, probably wrong because I just begin with the physic concepts, we only need 3 points like this so why 4 points and 4 axis ?



What did I miss ?


C/ PHY MAKE REVOLUTE JOINT : THE TWO SYNTAXES

1/ If I use "Phy make revolute joint 1,1,2,0,1,0,0,0,0", some defaults are used when this is the case. But what is the equivalent if I set the properties : set global/local anchor, set global/local axis ?
Phy make revolute joint 1,1,2,0,1,0,0,0,0 = Phy set revolute joint global anchor 1,0,0,0,0 and Phy set revolute joint global anchor 1,1,0,0,0 !?

2/ - Axis : 0,1,0 are the local/global axis for the object 1, object 2 ?
- Point : 0,0,0 is the local/global anchor of one object ?


I hope you have understand my questions and you can help me to understand all the concepts.
Thanks

Coding is dangerous for health ...
Fallout
22
Years of Service
User Offline
Joined: 1st Sep 2002
Location: Basingstoke, England
Posted: 4th Aug 2006 18:28 Edited at: 4th Aug 2006 18:29
I'm not 100% clear on the joints yet either, but I have been using revolute joints. My understand is:

PHY MAKE REVOLUTE JOINT ID, Obj1, Obj2, axisX, axisY, axisZ, X, Y, Z

ID, Obj1 and Obj2 are self expanitory really. They're the joint ID and the two objects to link together.

X,Y,Z are the real world coordinates the joint is located.

axisX,axisY,axisZ are a normal/vector that describes the axis the joint rotates around. In your example 0,1,0, this is describing no movement on the X a movement of 1 on the Y and no movement on the Z. This means the axis is pointing straight up vertically on the Y-axis. If you wanted your joint to point on the z axis, you would use 0,0,1. If you wanted it to be horizontal, pointing half down the z axis and half down the x axis you could use 0.5,0,0.5.

Here's some more guesswork. I'd imagine the difference between a local and global anchor is that the global anchor is a position in 3D space, and a local anchor is a position in 3D space relative to the origin of the object in question, taking into account its rotation and position.

UDun
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: France
Posted: 4th Aug 2006 19:40
Thanks for your answer Fallout. I think that the "PHY MAKE REVOLUTE JOINT ID, Obj1, Obj2, axisX, axisY, axisZ, X, Y, Z" command is clear for me now. I have made the same conclusions as you.

In fact, I used revolute joints but my questions can be applied to spherical, prismatical...joints too. It's more a question about the meaning of some concepts :
- phy set [...] joint global anchor : set the global anchor
- phy set [...] joint local anchor : set the local anchor
The explanations, in the documentation , don't really help me.

Coding is dangerous for health ...
Mike Johnson
TGC Developer
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 4th Aug 2006 19:53
I will look into writing some more detailed information on joints. One of the things that helps a great deal is to use the debugger. By using this you can see the exact location of the joint and all of its details. This is a great help in understanding what the values you're using do.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 4th Aug 2006 22:35
Fallout's explanation is spot on.

The other thing you need to understand about joints is that they don't have the physical constraints that a real joint has. I keep repeating this everywhere, but it's important to get it right.

In your first image, you have a revolute joint, acting like a hinge. But in Dark Physics, it can rotate 360, 720 or as many degrees as you like. It does not stop when it hits itself.

That, my friends, is the key to many errors, and also the key to some magnificent machines



UDun
18
Years of Service
User Offline
Joined: 28th Dec 2005
Location: France
Posted: 5th Aug 2006 00:46
Thanks for your answers. I'll use the debugger to see where the points are located, it's a good idea.

Yes, Batvink, it's interesting to repeat this otherwise we can't understand some physic concepts.

Coding is dangerous for health ...

Login to post a reply

Server time is: 2024-11-24 13:05:17
Your offset time is: 2024-11-24 13:05:17