GorzenDev Posted January 1, 2017 Share Posted January 1, 2017 first i like to say happy new year to all and i wish you a safe and productive year. i have a question about the pin argument of creating a joint. after playing around with joints it looks like the pin argument is in global space. how would i go about setting a joint's pin orientation based on some local rotation? for example 2 cubes binded by a hinge joint with a pin value of Vec3(1,0,0) X axis looks alright when both cubes are aligned with 0 rotation. but whenever i bind 2 cubes togheter with some rotation in mind the result is always global axis based? ------------------------------------- Edit: currently i have a workaround which involves aligning both cubes to a global axis then bind them with the joint:hinge then rotate it all back to there origional state. the joint then rotates as if local to the parented cube. but i assume there must be a better way.? please help. Quote Link to comment Share on other sites More sharing options...
Josh Posted January 1, 2017 Share Posted January 1, 2017 Use the transform commands to figure out the global axis from the local axis you want: http://www.leadwerks.com/werkspace/page/api-reference/_/transform/ You probably want this command: http://www.leadwerks.com/werkspace/page/api-reference/_/transform/transformnormal-r545 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
GorzenDev Posted January 2, 2017 Author Share Posted January 2, 2017 thank you very much just what i needed. feel a bit stupid i missed that Quote Link to comment Share on other sites More sharing options...
Josh Posted January 2, 2017 Share Posted January 2, 2017 Not a problem, welcome aboard! 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
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.