Character Interaction / Grabbing
by Lefion · in Torque 3D Beginner · 03/04/2010 (8:04 pm) · 5 replies
I am a little new to Torque 3D and I know what I am about to ask is a more advanced thing so if someone could help with tutorials, point into a direction, books, etc., would be very helpful.
What I am interested in doing is have the playable character to be able to grab a NPC in the game. Say like grab the arm to stop running...if you can imagine someone grabbing your arm to stop you from moving (tug of war image). What I am shooting for is a lot more in depth but I know if I figure this part out I can run with it.
Like I said, any help would be very appreciated.
What I am interested in doing is have the playable character to be able to grab a NPC in the game. Say like grab the arm to stop running...if you can imagine someone grabbing your arm to stop you from moving (tug of war image). What I am shooting for is a lot more in depth but I know if I figure this part out I can run with it.
Like I said, any help would be very appreciated.
#2
Now the other part. What about the character grabbing the NPC's hand and then run off still holding hands?
03/05/2010 (11:51 am)
I can see the animations being used together like that. Sounds good.Now the other part. What about the character grabbing the NPC's hand and then run off still holding hands?
#3
Well, that's just an extension of that mechanic. They need to run at the same speed, so ensure that they're running at the same exact speed parallel to each other, and that's not terribly hard to do (set their forward vectors to be the same, and set their speeds to be the same), while playing a hand-holding animation/pose. That should do it, though given uneven terrain, you'll probably see the pose fail when one is higher/lower than the other (if you're crazy, you can code an arm system that tries to make sure those hands are touching using some dynamic IK during the run... I wouldn't go through all that trouble, but it could be done).
Hope that helps.
03/05/2010 (12:09 pm)
Quote:What about the character grabbing the NPC's hand and then run off still holding hands?
Well, that's just an extension of that mechanic. They need to run at the same speed, so ensure that they're running at the same exact speed parallel to each other, and that's not terribly hard to do (set their forward vectors to be the same, and set their speeds to be the same), while playing a hand-holding animation/pose. That should do it, though given uneven terrain, you'll probably see the pose fail when one is higher/lower than the other (if you're crazy, you can code an arm system that tries to make sure those hands are touching using some dynamic IK during the run... I wouldn't go through all that trouble, but it could be done).
Hope that helps.
#4
03/05/2010 (1:52 pm)
the mechanics I understand. I can see this is the easiest thing to use to create the effect in the game. I just know the animating part is going to be the headache :-P
#5
Yep. Do a search for The Matrix Online and look for any developer blogs or articles relating to how they did their combat animations. Those were paired for better cinematic quality, and they might have let slip some good advice on doing that kind of stuff.
And if you find any information, share it with the community :)
03/05/2010 (1:59 pm)
Quote:I just know the animating part is going to be the headache :-P
Yep. Do a search for The Matrix Online and look for any developer blogs or articles relating to how they did their combat animations. Those were paired for better cinematic quality, and they might have let slip some good advice on doing that kind of stuff.
And if you find any information, share it with the community :)
Torque 3D Owner Ted Southard
Since it's an RPG, we're rolling for the success of the grab, so when it happens, we play both animations, and then flag the NPC so that they won't be able to do anything else (except certain actions which either break the hold or can be executed while being held).
If you wanted to be fancy, you could then begin a timer and then at the end of it make your NPC pass out. If you created headlock animations, then you're half-way to a wrestling game ;)