This is probably a very simple question and I apologise if it is but it's driving me to distraction
I am trying to programatically insert a joint into a 3D world and as it says in the subject it's a simple slider joint.
The problem I'm having is with the slider joint axis. I have the rotation of the body I want to attach the joint to in degrees (+/-180) but using Sin and Cos I cannot get the slider joint to work when I set the vector for the slider joint axis.
I can intialise a slider joint with an axis of (1, 0, 0) which is the initial orientation of the object and the slider joint works fine but when I try to use the angle of the object when I add additional slider joints by using the angle of the object in the Y direction to provide the slider axis via (cos y angle, 0, sin y angle) it doesn't work. I set up some boundary tests, for example (-1, 0, 0) doesn't seem to work and I though 45 degrees would be (0.707, 0, 0.707) but it doesn't seem to be.
If someone could give me some examples of vectors for 45, 90, 180, -45, -90, -180 I may be able to understand it better?
This is probably very simple but if someone could give me a pointer on this I would appreciate it.
Thanks in advance.
Martin

