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 / Help with limb offset

Author
Message
ADnetvi
15
Years of Service
User Offline
Joined: 12th Feb 2011
Location:
Posted: 12th Feb 2011 15:47
I need help trying to find why this doesn't work
i tried doing it in many different ways none of them worked



Thanks
Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 12th Feb 2011 20:57 Edited at: 12th Feb 2011 20:58
What is it that you expect to do, and it's not doing?

I ran your code and I can see all the limbs, all with the colors you chose. Here's a (very) low quality jpg of what I see when I back the camera off.



ADnetvi
15
Years of Service
User Offline
Joined: 12th Feb 2011
Location:
Posted: 12th Feb 2011 21:02
I want to know why the limb on top of the red rectangle is not a pink and why it didn't move 5 quants to the right of its parent as i specified in the code.
Thank you for responding
Cor
AGK Developer
15
Years of Service
User Offline
Joined: 19th Dec 2010
Location: Its a trap!
Posted: 12th Feb 2011 23:02
Hello,
The reason why the top limb is not five units to the right is because you linked it before you colored it and offset it try this. I tried this out and it worked fine for me giving me a "c" type shape.
hope i was of some help

Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 12th Feb 2011 23:49 Edited at: 13th Feb 2011 06:24
Well, the limb on top is actually overlapping the vertical dark red limb by 5 units.

One thing to be aware of is that adding a limb can change the order of limbs in relation to linking them.

From the help entry on add limb:
Quote: "When you ADD LIMB, all limb index values are re-ordered to reflect the new hierarchy, so old limb numbers will not be the same as they where before the LINK LIMB command."


If you put the linking commands after the add limb commands, the result is this:



(I made the background white, so it's easier to see)

ADnetvi
15
Years of Service
User Offline
Joined: 12th Feb 2011
Location:
Posted: 13th Feb 2011 00:55
I tried doing what you asked by putting all the add commands on top however the results didn't change at all could you post your code so I can see exactly what you did?
thank you
Rich Dersheimer
AGK Developer
17
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 13th Feb 2011 06:22
Here's the code...



ADnetvi
15
Years of Service
User Offline
Joined: 12th Feb 2011
Location:
Posted: 13th Feb 2011 14:31
Thanks for your help
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 13th Feb 2011 18:51
It's actually the linking of limbs that changes their order.

The first method I used and implemented in my plug-ins was to allow you to name limbs as you add them, so that later you can use that name to get the limb you need.

The second method were the 'transactional' object commands, where you can construct your object one limb at a time, linking them as you go.

Login to post a reply

Server time is: 2026-07-16 04:35:43
Your offset time is: 2026-07-16 04:35:43