Download

Set Player Character position relative to overlapping object

Hello Everyone :slight_smile:

I’d created simple setup, where the big, white actor triggers the climbing mode for Character (done with flying mode). Climbing up is done and for now works as intended. I have a problem with setting Player Character position before playing animation that allows Player to jump off the ledge (when Character is overlapping with white climb trigger and push interact button) and then go back to climb mode. What I’ve tried to do is to setup fixed distance between Character and white trigger’s forward vector, from which jump of animation would start playing.

I can’t figure out the proper vector math that allows to position Player Character with Vinterp in exact distance from trigger regardless of Player’s current position when overlapping with it. The logic should work in a way, that the Player’s Y and Z axis stay’s the same and only the forward vector is taken into account. Code that tweaks rotation of the Character to match trigger’s rotation is also working and Character always rotate to desired angle. Unfortunately the blueprint with logic was scrapped as I tried to find way to do this. Oh and if that could be important, jump of animation is using root motion.

The yellow bar is just trigger for climb finish animation.

It would be great if someone could help me solve this problem :slight_smile:

Cheers!!!

Hello again!

I’ll add, that I’d manage to make it work (sort off) but the Character always move in the same way not taking to account rotation of climb area trigger. I know that Im not doing this right but just wanted to share my attempt.

Pls ignore lack of blueprint connection, it’s just dummy code :wink: