Download

Animations that interact with the enviroment

Hello, i am sorry if this has been answered before, i couldn’t find anything on the matter.
I am close to the polishing phase of my project and was looking to add some more “bling” to it.
What i am trying to do and failing hard is to have animations seamlessly blend when close objects like walls, railings etc.
So when the character moves close to a railing he grabs it and keeps moving or when near a wall he places his hand on the wall.

The issue i am having with this is i have no idea how to actually place the hand on the correct spot and snap it on there until the character movement direction is changed by the player, that’s the main issue. So far all i managed to do is create an animation in Maya and try to align it with a railing via Linetrace, kinda works but only if the position is absolute and the player does not move, so not really what i am looking for.
Not looking for a complete solution or a tutorial (even though that would be awesome) but some general direction to take & research.

Ty in advance folks, hope someone can shed some light into the matter.

Here’s an example when she touches the car. The Last of Us Part 2 Gameplay Trailer (4K) - E3 2018 - YouTube

You want to do this with IK. In essence you fire line traces out in a few directions and place your IK effectors there.

There’s obviously a lot more to it than that if you want it to look polished but that should at least give you a starting point for your searches.

At it’s root what you are talking about is context animation which is usually applied when the player needs to interact and behave in a controlled manner.

Example

The assumption is by it’s self with out an assist the migration path can handle world interaction on it’s own rather than restricting the state changes to the proper migration path or even switching the animation BP out as to the required state.

In the case of the ladder climb the player enters a trigger volume that controls and limits the action states required by the ladder and not as an action state in general. Using a trigger you can lock the migration path or even switch out the anim bp

I’m not sure an action state would be appropriate here as you would need to then add a trigger volume to every wall and object for when you get close to it. Using a trace to check against, say, a tag would allow for a lot more natural occurrences. You also won’t know where to place the hands with simply a trigger volume and will need to do a hit trace anyway to figure out exactly where the wall or whatever is.

Does not need to be a trigger volume but there is still a need to be able to communicate with the BP as to the state the animations needs to be in. Using a physics material for example we define what walls can be climb. Traces are cool but like everything else needs to be evaluated. For our project we have a bunch of different ready entities for our map makers to select from.