Game Development Community

DTS Shape can't aim pitch?

by Nicolai Dutka · in Torque Game Engine Advanced · 07/27/2008 (7:30 pm) · 4 replies

I used setDatablock to change temporarily set the DTS shape of the player to that of a gun turret. Now, I cannot shoot bullets in the direction I aim my pitch up/down (the view changes but bullets shoot straight). Is there something special I have to do to make that work?

Does it have to be a skinned mesh? Does it have to be animated? I made a character before that works just fine and I don't remember doing anything other than making it a skinned mesh with the basic animations for root, jump, back, side, etc, but I never did anything with looking up/down and he can in fact shoot bullets up/down.

#1
07/27/2008 (8:08 pm)
I'm willing to share my .max file with anyone who wants to figure out why I can't export it.
I used 3ds Max 2009 to make it.

Let me know and I'll email it to you.
#2
07/28/2008 (5:31 pm)
I exported my object from Max 2009 as a 3DS object and imported that to Max9, then repaired the object (the polys had all become seperated so I had to collapse verts at every vert point...).

I then re-setup the character including skeleton, skin mesh, eye/cam nodes, mount nodes, materials, etc. I can now export the model properly! Showtool displays the model, all the nodes (including bones), the whole works, but I still cannot aim my pitch up/down.

What else do I need to do to get the bullets moving in the direction I am looking? If I switch models to the original, or to a custom humanoid one I created previously in school via setDatablock, I the bullets will go the direction I am looking, but using this character, they do not. I can look up into the air, but the bullets shoot straight out from me rather than the direction I am looking...
#3
07/28/2008 (5:56 pm)
I GOT IT!! WOOT!!!

I had mount0 linked to boneC which was rotating upwards, but the link point was not moving at all. I linked it to boneD which was just the ending nub, but linked to boneC. When boneC rotates upwards, boneD "moves" upwards with it and thus, mount0 moves as well. Now when I look upwards and fire, VOILA, the bullets go upward too!

Does that make sense?

Ok, so one last thing:

When I look up/down, there is no animation on the character (turret). How would I make it so that just the gun part of the turret will pitch up/down when I look up/down? The bullets are going the right direction, so I know the mount point is moving, but why not the gun?

Again, I am willing to pass on my max file (now made with 3ds Max 9) to anyone who needs to see it (or wants to use it). It's a prototype, so it isn't the prettiest thing to look at, but works great.
#4
07/29/2008 (9:36 am)
Do I need to create an animation + sequence for this character model in order to make the weapon move up/down when I look up/down? (Keep in mind, the "weapon" is part of the mesh!) If so, do I need to name the sequence anything in particular? What I pretty much want here is for one section of the mesh to move up/down in the same manner that the Torque Orc moves his head up/down (rotates on its own X axis to simulate looking up/down) as you pitch your aim. It's purely for aesthetic reasons because it doesn't make much sense for a turret to shoot up in the air with the barrel of the weapon still pointing straight ahead...