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.

DarkBASIC Professional Discussion / child-limb movement restrictions -- how?

Author
Message
Frans
17
Years of Service
User Offline
Joined: 12th Sep 2008
Location: Netherlands
Posted: 8th Apr 2010 01:47
Attached is a sketch of what I'm trying to accomplish.
The horizontal line is the child-limb from the other line (parent).
I want the child only to move horizontally when the 'wheel' turns.

Please give me some advise.

Thanks

Frans
Hawkblood
16
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 9th Apr 2010 19:31
I think you will have to do that manually. I think you are looking for something like an IK or HK chain. Let me guess: when you move the parent by a rotation, the child rotates the same angle.... Right? You have to "fix" two of the axis and let the other axis move freely, but only at one vertex. My guess is that you are making something like a train wheel and piston. So you want the wheel to rotate and the arm to follow with the piston moving only side to side.... Right?

If that's the case, don't attach these items together. Make some dummy objects (that are hidden) and attach them to these items for reference only..... One to the wheel at the point where the arm attaches and the other to the arm where the piston rod attaches. Use some math or just by trial and error to determine where your arm's spacial pivot will be and keep that in mind for later, check the location of the wheel's dummy and place your arm at that location each frame. Point the arm at the pivot you determined earlier and that will take care of the wheel and the arm. Oh, BTW, you will have to make the arm's ACTUAL pivot at the joint where it meets the wheel. Now, use that same idea with the piston rod, but the location it is pointing will be another dummy that simply goes back and forth using a sin function at a distance you must determine with some math (or eyeball with trial and error) and the "angle" is taken from the wheel rotation.....

If your not trying to do what I think you are, then I just wasted a lot of our time writing this long-winded post.

The fastest code is the code never written.
Frans
17
Years of Service
User Offline
Joined: 12th Sep 2008
Location: Netherlands
Posted: 9th Apr 2010 23:37
Hawkblood thank you very much for your lengthy reply.

You understood perfectly what I'm trying to do.
I was thinking of using EZRotate to get the arms working.
So I need some time to absorb your aproach to it.

Regards.

Frans
Frans
17
Years of Service
User Offline
Joined: 12th Sep 2008
Location: Netherlands
Posted: 10th Apr 2010 13:12
Could you tell me how to change an objects pivot other than with EZro_ObjOrbit?
Mobiius
Valued Member
23
Years of Service
User Offline
Joined: 27th Feb 2003
Location: The Cold North
Posted: 12th Apr 2010 18:51
Offset limb.

My signature is NOT a moderator plaything! Stop changing it!
Frans
17
Years of Service
User Offline
Joined: 12th Sep 2008
Location: Netherlands
Posted: 12th Apr 2010 19:01
Thank you
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 12th Apr 2010 21:21 Edited at: 12th Apr 2010 21:25
@Frans
Are you looking for something like this ? :



or like this ?.



Those codes are made all manually, but they work.

cheers.

I'm not a grumpy grandpa
Frans
17
Years of Service
User Offline
Joined: 12th Sep 2008
Location: Netherlands
Posted: 12th Apr 2010 21:40
YES!!

Well, very, very close.

Just fantastic chafari.
You have no idea for how much you made my day.
Thank you so much!

Frans
chafari
Valued Member
20
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 12th Apr 2010 23:45
@Frans
I`m glad you like it. Enjoy it


Cheers.

I'm not a grumpy grandpa
Hawkblood
16
Years of Service
User Offline
Joined: 5th Dec 2009
Location:
Posted: 14th Apr 2010 00:47
Sorry, I lost track of the posts I was replying to. Mobiius response is a good way to answer your question:
Quote: "Could you tell me how to change an objects pivot other than with EZro_ObjOrbit? "

I don't usually like to use that because I like a certain amount of literal control.... I simply make the objects seperately with their and their pivots will be at 0,0,0. I orient my verteces around that. BTW I use 3DSMax and export using panda. Like I said, Mobiius has the best DBP method I know of.

The fastest code is the code never written.

Login to post a reply

Server time is: 2026-07-26 14:30:47
Your offset time is: 2026-07-26 14:30:47