Grappling Hook
Problem:
How do I make a grappling hook?
Being the first time ever working on implementing a grappling hook can be a nightmare as physics can be the end of a game. I first started to research pendulum physics and learned more about how pendulums work since that's how I wanted the grappling hook to feel.
In Wikipedia, I came across this gif which showed visually how it works. But now the question became how do I implement it using 3D vectors in Unreal Engine? Started to research more and found no posts on how I can convert the pendulum formulas to 3D vectors. As I looked at the gif movement from up above, I realized I had to make use of the dot product to produce the acceleration scalar and the velocity vector. After then another question arose, how can I make the velocity vector change like that in the gif above? So I started to research more and ran into a youtube video of someone making Spider-Man movement in unreal engine 4.
Solution:
In this video, the creator used the dot product of the vector from grapple point to character and velocity to make a pendulum-like effect and it worked fairly well. So I implemented that into my grappling hook, and I started to see some improvement, finally, there were swings. But another problem arose as velocity increased exponentially making the swing physics bug out. I solved this by normalizing the velocity vector and the vector to a character from the grapple point, then dot-producing them to find the acceleration value and creating my own speed calculations. With that finishing touch, the grapple hook was stable and ready to use.
- Vrij Patel, VECCA Developer
Shutdown
Status | Released |
Authors | TheSenate2002, ekicks0, Vrixic, CameronEuston, Boomishhe, mditcharo |
Genre | Puzzle, Adventure |
Tags | First-Person, Singleplayer |
Languages | English |
More posts
- The FinallyApr 27, 2023
- Post Mortem VideoApr 27, 2023
- Fixing issue with Hud not being validApr 27, 2023
- Finalization of GameplayApr 27, 2023
- Circuit Puzzle ChangesApr 27, 2023
- Touching Up SoundsApr 22, 2023
- Level MusicApr 22, 2023
- Getting people to play the gameApr 21, 2023
- Tuning the Lighting in Level 3Apr 21, 2023
- Static Mesh Mass ScaleApr 21, 2023
Leave a comment
Log in with itch.io to leave a comment.