Playing animations at non root positions
by Emmanuel Nwankwo · in Torque Game Engine · 03/15/2005 (11:14 am) · 6 replies
Hi,
I was wondering if anyone could explain to me how to play an animation at a particular position. for instance to place a player hanging from a ledge and waiting for the press of a key to move him left, right or to climb up. do you need to set where the animation should take it's root transform from, say hand mount points, reason being that a contact point on the ledge would have to be found either by raycast, maxstepheight or a trigger, and you would want to play an animation to place the player's hands at that point so that he effectively hangs from the ledge.
How would you place this animation, at the contact point?
I was wondering if anyone could explain to me how to play an animation at a particular position. for instance to place a player hanging from a ledge and waiting for the press of a key to move him left, right or to climb up. do you need to set where the animation should take it's root transform from, say hand mount points, reason being that a contact point on the ledge would have to be found either by raycast, maxstepheight or a trigger, and you would want to play an animation to place the player's hands at that point so that he effectively hangs from the ledge.
How would you place this animation, at the contact point?
About the author
#2
I am going to keep an eye on this thread though. I'm probably going to have a similar problem
If your using tiles can't you just asign collision to one certain tile and when the player hits that tile said animation takes place until it reaches the end of where it is suposed to happen.
Or if using a background image, couldn't you just put an invisible tile layer or certain areas like I said above that would interact in the same way?
03/16/2005 (6:00 am)
That didn't sound easy.I am going to keep an eye on this thread though. I'm probably going to have a similar problem
If your using tiles can't you just asign collision to one certain tile and when the player hits that tile said animation takes place until it reaches the end of where it is suposed to happen.
Or if using a background image, couldn't you just put an invisible tile layer or certain areas like I said above that would interact in the same way?
#3
03/16/2005 (1:50 pm)
Most games of this type, use triggers or such to signify the climbable/hangable edge. They also painstakingly build so that the heights are all proper. Very very rarely is any of this accomplished by forcible animations.
#4
@manoel - does this mean that the bounding box is animated as well during the creation of the jump vertical sequence and will the bbox have to contain the hands outstretched upwards.
@erik - what do you mean by forcible animations
@charlie - i wont be using tiles for this, but i guess it's just one less dimension to worry about
03/17/2005 (4:26 am)
Thanks guys, @manoel - does this mean that the bounding box is animated as well during the creation of the jump vertical sequence and will the bbox have to contain the hands outstretched upwards.
@erik - what do you mean by forcible animations
@charlie - i wont be using tiles for this, but i guess it's just one less dimension to worry about
#5
I'm sure they would smoothly interpolate the position if the player was close enough to the optimal location to a "climbable", and if you weren't close enough, well, fall to your death?
But yes, unfortunately very few engines use literal physical models for what ledges can be grabbed/climbed (as mentioned, most explicitly mark the areas that are candidates for this, generally in terms of specific lines that can either be traversed along its length or that you can pull yourself up with/jump off of) -- Thief 1 and 2 were some of the only games I know of with that kind of great "mantling" (although you couldn't just hang there, and they didn't deal with the animation problem since it was first-person), but it was very tactile and you could really "feel" the ledges you grabbed and pulled yourself up to, and could also feel yourself slipping if you tried to walk along too narrow a ledge -- they put a tiny descent in, as if you'd stepped off and down with ONE -- but not both -- feet, and that let you know you were on the extreme edge and even breathing might send you over.
Heh, don't even get me started on Thief. Sheesh, what they did with LEANING has never been approached; that was so incredibly intuitive and visceral -- you felt your head actually sliding right next to a brick wall when you leaned around a corner, heh.
03/17/2005 (7:07 am)
Prince of Persia you really noticed that they used a fairly unsurprising grid layout for all of the surfaces you could climb/grab. Very regular in proportion to player jump+reach height.I'm sure they would smoothly interpolate the position if the player was close enough to the optimal location to a "climbable", and if you weren't close enough, well, fall to your death?
But yes, unfortunately very few engines use literal physical models for what ledges can be grabbed/climbed (as mentioned, most explicitly mark the areas that are candidates for this, generally in terms of specific lines that can either be traversed along its length or that you can pull yourself up with/jump off of) -- Thief 1 and 2 were some of the only games I know of with that kind of great "mantling" (although you couldn't just hang there, and they didn't deal with the animation problem since it was first-person), but it was very tactile and you could really "feel" the ledges you grabbed and pulled yourself up to, and could also feel yourself slipping if you tried to walk along too narrow a ledge -- they put a tiny descent in, as if you'd stepped off and down with ONE -- but not both -- feet, and that let you know you were on the extreme edge and even breathing might send you over.
Heh, don't even get me started on Thief. Sheesh, what they did with LEANING has never been approached; that was so incredibly intuitive and visceral -- you felt your head actually sliding right next to a brick wall when you leaned around a corner, heh.
#6
If I were to do climbing ledges, I would have two animations: a jumping-to-grab animation, that plays while the character is jumping up before grabing the ledge. That way the ledge height wouldn't need to be exactly the same everywhere. Then when the character is high enough to grab the ledge, I'd change it's current state to "grab" or something (a FSM is required to get this working properly), and during this state it wouldn't move. Instead of moving, I'd play an animation.
That animation would make the character climb the ledge. It's bounding box would remain where it is, in mid-air, and the Player mesh would animate to properly climb the ledge up to root position. Then I'd "teleport" the character to that final position (to avoid using magical numbers, I'd use an unused mount point to mark where the character will end up after the animation), and switch to the root position without transition.
That's sorta what I do to get my character to mount a horse, with a mounting animation for each side of the horse.
03/17/2005 (2:08 pm)
The bounding box defines the zero position for your character. If you animate your character so it moves away from the bounding box, while the box remains static, inside Torque the character mesh will walk away from it's bounding volume origin.If I were to do climbing ledges, I would have two animations: a jumping-to-grab animation, that plays while the character is jumping up before grabing the ledge. That way the ledge height wouldn't need to be exactly the same everywhere. Then when the character is high enough to grab the ledge, I'd change it's current state to "grab" or something (a FSM is required to get this working properly), and during this state it wouldn't move. Instead of moving, I'd play an animation.
That animation would make the character climb the ledge. It's bounding box would remain where it is, in mid-air, and the Player mesh would animate to properly climb the ledge up to root position. Then I'd "teleport" the character to that final position (to avoid using magical numbers, I'd use an unused mount point to mark where the character will end up after the animation), and switch to the root position without transition.
That's sorta what I do to get my character to mount a horse, with a mounting animation for each side of the horse.
Associate Manoel Neto
Default Studio Name