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.

Newcomers DBPro Corner / Trouble creating a limb

Author
Message
Jonk
18
Years of Service
User Offline
Joined: 31st Jul 2005
Location: East of Java
Posted: 12th Jan 2014 16:58
Hi I\'m trying to load a player object and a gun object and then attach the gun using the limb cammand but it keeps telling me that it needs to be added in sequence.

How can I find out how many limbs the original object has?

I originaly used this peice of code but it doesnt print anything.



Here is my program



"There are no perfect ideas only perfect intentions"
Jonk
18
Years of Service
User Offline
Joined: 31st Jul 2005
Location: East of Java
Posted: 12th Jan 2014 17:37
OK I managed to write my own litte program for discovering the next sequencial limb number.

I'm so proud of myself lol



"There are no perfect ideas only perfect intentions"
Jonk
18
Years of Service
User Offline
Joined: 31st Jul 2005
Location: East of Java
Posted: 12th Jan 2014 18:59
Ok at last I managed to attach the gun to the player with the add limb command and position it with offset limb command, but now I have another problem.

The gun is stationary when any animation plays where did I go wrong?
here's the code and media;-



"There are no perfect ideas only perfect intentions"

Attachments

Login to view attachments
chafari
Valued Member
17
Years of Service
User Offline
Joined: 2nd May 2006
Location: Canary Islands
Posted: 12th Jan 2014 19:44 Edited at: 12th Jan 2014 19:49
Instead of adding a limb to the object, you could just place the gun over the limb you want "limb position x,y,z", and then simply rotate the gun with the "limb angle x,y,z".

To know how many limb has an object, we could do something like:



To know exactly the limb we need, we could do this:
Imagine that our object is made by separate pieces

into the main loop...



In the case our object is made of a single mesh but has lots of limbs and we are not sure which one is the hand...

into the main loop....



I'm not a grumpy grandpa
Jonk
18
Years of Service
User Offline
Joined: 31st Jul 2005
Location: East of Java
Posted: 13th Jan 2014 03:35
Thanks chafari that little bit of code allowed me to attach the limb to the correct parent limb. I used your second peice of code but with offset instead of rotate.

I think as you say the object is made of a single mesh but has lots of limbs.

Anyway the player now shows correctly carrying his gun and the animation now displays correctly, thanks again.



"There are no perfect ideas only perfect intentions"

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-18 17:58:38
Your offset time is: 2024-04-18 17:58:38