Escape The Room
Made in Unreal Engine 4
Escape The Room is a 3D Puzzle game. The player is locked in a room and has to figure out how to escape.
This was a solo project from the UE4 Course on Udemy.
Code Explaination: This raycast function will return a FHitResult which contains all the information about the Actor it is hitting. The function will take the owners' position as the first vector. In order to get the second vector the owners' location and rotation will be added with a reach number. The orientation vector is set the the default world position, which is (0, 0, 0). The function makes uses of a filtering to only hit PhysicsBodies. The system report is useful for debugging and can be turned off.
Drag and Drop Script
Code Explaination: To prevent crashes the script will search for the necessary component. After that the script will bind two input bindings to the Grab() and Release() functions. When the Grab() function is triggered, the function will make use of the raycast function to find a grabable object. If a grabable object has been found the position of that object will adjust to the players grab position. When the Release() function is triggered, the function will drop the grabbed object.