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 AppGameKit Corner / [SOLVED] FixObjectToBone( objID, toObjID, toBoneIndex )

Author
Message
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 28th Nov 2021 14:10 Edited at: 3rd Aug 2022 20:26
Similar to FixObjectToObject except the parent will be a bone in the other object.
The command, whatever one may say, glues to the main object. I wanted to stick the Uzi to the soldier's hand. But the Uzi was glued to the main object and did not participate in the animation.
Is this how it should be? An example I saw where a pistol was glued to a soldier's hand was involved in the animation. Then it dawned on me that it was a model soldier with a pistol. But in the game guru, by default, all objects are unarmed, but at the same time their weapons stick to the hand and participate in the animation.
I still can't figure out how to implement this.


programming is a hobby, not a job.
P.S. in google and youtube - nikename pavelman- it is not me!

Attachments

Login to view attachments

The author of this post has marked a post as an answer.

Go to answer

jd_zoo
5
Years of Service
User Offline
Joined: 12th May 2018
Location: Nova Scotia
Posted: 28th Nov 2021 14:49
If the hand is it's own mesh in the model, could you get the mesh X/Y/Z and have it follow that maybe?
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 28th Nov 2021 15:30 Edited at: 3rd Aug 2022 20:27
Quote: "If the hand is it's own mesh in the model, could you get the mesh X/Y/Z and have it follow that maybe?"



FixObjectToBone( 2, 1, 16 )
Using the method of poking and bulkheading all the options, I was able to glue the ultrasound to the leg. I need to hand.
programming is a hobby, not a job.
P.S. in google and youtube - nikename pavelman- it is not me!

Attachments

Login to view attachments
jd_zoo
5
Years of Service
User Offline
Joined: 12th May 2018
Location: Nova Scotia
Posted: 28th Nov 2021 16:31
So many possibilities... When inserting the gun only, does it show up at 0,0,0 or is the center point offset in the model?

If you know the mesh # for the hand you want to follow, I'd try creating a simple cube or sphere that will follow that hand around properly. Once that is working look to swap out the temporary object with the guns - but not knowing your model that might not work here. Does AppGameKit report back multiple with GetObjectNumMeshes( objID ) ?


Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 28th Nov 2021 16:55 Edited at: 28th Nov 2021 16:56
This post has been marked by the post author as the answer.
Quote: " I was able to glue the ultrasound to the leg. I need to hand."

then find the hand?:
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 28th Nov 2021 17:10 Edited at: 3rd Aug 2022 20:27
Quote: "then find the hand?:"




Thanks. I found it by typing.
Now it remains to find out the animation cycles of the model.
programming is a hobby, not a job.
P.S. in google and youtube - nikename pavelman- it is not me!

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-04-25 17:25:59
Your offset time is: 2024-04-25 17:25:59