Game Development Community

Animation affecting position

by David Horn · in Torque Game Engine · 02/13/2008 (6:47 pm) · 4 replies

I have a problem that's pretty crucial to my fighting game.

I need to be able to change my AIPlayer's position via DSQ animation.

For example,
I have an animation the makes a player get hit. During this blend animation, the player biped moves back (in 3dmax). Inotherwords, the biped's horizontal position changes.

When I trigger this using playthread, the player animates correctly, but since it has no affect on the position (a getPosition() gives the same values during the animation), after the animation concludes he snaps back into the position where he started the animation.

I've tried several exporting options such as animating the bounds, using grounf transformation, etc. but I think that I may have to alter the engine code because I fear that when the fighter goes down, unless I have total control of his transform via the animation, he'll pop right back up. I realize this may mean I'll need to code the walk and side animations by hand if I can't use blend animations, but can anyone guide me in the right direction?

Thanks

#1
02/13/2008 (7:29 pm)
A physical push back will require him to be moved in script/code rather than art.

edit:typo
#2
02/14/2008 (5:38 am)
In that case I sadly wasted 200 bucks. And that's no joke because I'd never be able to make my fighting/wrestling game.

So after each of my hundreds of animations - dropkicks, bodyslams, suplexes, dives outside the ring... I have to use trial and error to set a new position of my player in the endSequence function?

There has to be a way to disable this?

Does any other entity (shape, static, etc) in torque have the ability to be moved via animation?

Could I at least be able to get the position of a node or mesh linked to the biped and the use that to set the posision of the AIPlayer at the end of each animation?

It appears that the death animation is special within the player.cc file. Is there any way I could maybe hack this to have all animations that are not walk, slide, or back be "death" animations and thus receive their transforms from the animation?

*Edit - added some brainstorming ideas

Thank you for your quick reply by the way...
#3
02/14/2008 (8:46 pm)
Yes. You can use your attacks to apply an impulse to the character. The animation will play, but the impulse will be what physically moves whoever got hit.

Or yeah, you could explore the idea you mentioned with the death animation.
#4
02/15/2008 (11:46 am)
Quote:In that case I sadly wasted 200 bucks. And that's no joke because I'd never be able to make my fighting/wrestling game.
Don't forget, those 200 bucks bought you the source code. Anything you don't like, you can change. It's not like it's impossible to have the feature you describe implemented - you'll just have to put in some work. If you didn't intend to change any of the source code, then, yes, you did waste 200 bucks - because in that case, you may as well just use the free demo.

Quote:Could I at least be able to get the position of a node or mesh linked to the biped and the use that to set the posision of the AIPlayer at the end of each animation?
Should be. Take a look at the 'get node transform' thread in the Engine board.

Quote:It appears that the death animation is special within the player.cc file. Is there any way I could maybe hack this to have all animations that are not walk, slide, or back be "death" animations and thus receive their transforms from the animation?
That's a possible route to explore. Good to see you're making use of your source code privileges :) I haven't done much work in animation, so I can't offer specific advice - except, if you must make a hack, at least take the time, after it's working, to un-hack it and make an actual, robust system :P.