Friday, January 15, 2021

GhostRunner Study


This is a short project i used to study the game "Ghostrunner". I wanted to recreate the movement system in unreal 4, and also added some basic combat. The animations were made in blender, and could use a lot of work, but the point of this project was to show my ue4 ability. 

For the wall running, I just got the cross product between the hit normal and the players up to decide what direction the player should run. I also smoothly lean the player camera similarly to how the game does. 

When jumping towards a ledge, if the angle is towards the wall, the character attempts a ledge grab. A line trace is fired above the players head, and if it hits nothing a ledge is detected for the player to climb up on. 

For the grappling hook, I add force to the player based on a curve. I also added a particle effect so you could see what you attached to. While I was at it, I cropped out the grapple icon from the game and animated it as a widget.

For the projectiles, I made it so the aim is predictive. I used a method outlined here. I then simply made the bullet raycast over its delta to reliably get the bullet collision. If the player is attacking, it is reflected, otherwise it restarts the level.

Overall, this was a fun side project. I really liked the feeling of the wall running and grapple. If I had time, I would spend more time working on the combat.

No comments:

Post a Comment