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 / Change weapons/gear/clothes? 3d models

Author
Message
Golelorn
8
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 3rd Aug 2017 01:10
Anyone have tips or leads on how to switch out gear. Like from a knife to a baseball, etc?

Do I just need to figure out the relative position of the hands? And then have the baseball bat move/rotate with the hand?


Thanks.
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 3rd Aug 2017 21:58
FixObjectToBone may help.
You cand displace and rotate the weapon previously, then use FixObjectPivot. this helps placing it correct in the players hand. You may also do this in your modelling software.
The weapon moves and turns with your animation.
Golelorn
8
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 4th Aug 2017 00:37
I saw those, but there is a warning to only use it on more powerful platforms(WIN, MAC, etc). I took that to mean it needed a lot of resources that mobile phones won't have.


How would I do it in the modeling software? Can we somehow hide and unhide certain things that are loaded with children in AppGameKit? I was under the impression there was no way to drill down into that. I've seen no commands that allow us to unhide/hide objects that haven't been loaded separately. For instance, a sword swing and bat swing would be the same animation. You just hide the bat and unhide the sword. I know how to do this in blender. But in AppGameKit I have no idea how to do that.
Green7
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: Switzerland
Posted: 4th Aug 2017 08:12
you do the FixObjectPivot only once, just right after you load the model, just to fit it manually in your players hand, if it does not fit by it self, and thats no resource problem (doing it myself on a mobile, works). The place and direction of the weapon is given by the place and direction of the bone you attach it to. You should not do it repeatedly in your main loop, that is resource demanding.
If you do the offset you maybe need from 0,0,0 previously in your modelling tool then you can skip FixObjectPivot.
Load the weapons separately, hide and unhide them as you wish.
Best is if you go and try it, you will see what i mean.
Golelorn
8
Years of Service
User Offline
Joined: 20th Nov 2016
Location:
Posted: 4th Aug 2017 23:27
Thank Green7! Will do.

Login to post a reply

Server time is: 2024-11-22 07:29:18
Your offset time is: 2024-11-22 07:29:18