Mounting an item to a player
by Dave Young · in Torque Game Builder · 02/16/2009 (7:51 am) · 4 replies
I've been thinking about this for a few days but I don't know TGB well enough to find an obvious solution yet.
I want to accomplish mounting an item to a player, like a gun or sword. And, of course, having it animate when they do.. so the source art doesn't have to get rendered with the player holding every separate item in every frame. Are there any examples of something like this?
I want to accomplish mounting an item to a player, like a gun or sword. And, of course, having it animate when they do.. so the source art doesn't have to get rendered with the player holding every separate item in every frame. Are there any examples of something like this?
#2
02/17/2009 (2:38 pm)
I'm going for a solution similar to guiObjectView which does support mounting of subobjects. My first attempts at adding in a second shape were somewhat successful ie a shape does get loaded and mounted but it doesn't render yet :) I will most likely need to get deep into the rotation matrix differences to make it happen.
#3
02/17/2009 (2:43 pm)
So you are planning on hacking into the source then? I did my change all in the existing script code.
#4
02/17/2009 (2:51 pm)
Absolutely, all the good stuff gets done there!
Torque Owner Nic Biondi
Default Studio Name
www.youtube.com/watch?v=0th7qd-TYvI
The basis of the solution is to use a 3d program to create the animations, and have each item bound to those animations, then attach via layer, and flip them when you turn. It's a bit of a b17ch, I'll tell you now.