Hello Guys. I just want to share my Simple Third Person Interaction with you.
As the name suggests it provides Interaction for Third Person Games and also is based upon the TP-Template.
Hopefully I made it easy to understand.
Basically the Controller does a trace from the Pawn towards infront of it.
If it founds something interactable, it has two options:
- Either The Pawn moves automatically towards the interactive Object if it is not reachable
- Or the Pawn is already in a “tolerance zone” and can interact with it directly
I make use of a so called “Ideal Location”, which describes where the Pawn has to be to interact with the Object.
For example for a button, you need to stand infront of it and also face towards it.
I provde some options, too:
There’s a Timer that defines how long the pawn may move/try to move towards the interactive object.
If the timer elapsed, the pawn may either cancel completely or magically sweeps(through obstacles) to the object.
The Tolerance for Location and Rotation is used to make it easier to interact, since it is impossible to align the player correctly.
For example you may face a button with a 22.5° difference in yaw, but you can still use it.
Once the Pawn is in ideal position, the Interactive Object AND the Pawn play an Animation.
The Animation is determined by the Interactive Object (and can be unique for pawns).
You should test it for yourself:
Unreal Engine Version: 4.14.3
Pls give feedback
(****** animations are intended to be ******)