Me and my team are working on a sci-fi horror game where the player will use a gun to create ziplines from one platform to another. We are basically trying to recreate the rope gun from sons of the forest, you shoot the starting point of the zipline and then you shoot the end point of the zipline. This is easy enough but the challenge has come from making sure the zipline doesn’t break the game.
We need to make sure the player cannot create a zipline if there is a wall or anything in between it and the player. We also need to make sure the player cannot ride the zipline unless it comes off the ground at a certain height. For example lets say you shoot one end of the zipline at the ground and the other end 6ft higher than you at a wall that’s 20ft away. The player shouldn’t be able to attach to the zipline from the starting point at the ground because they would clip into the floor.
To summarize how would one go about checking the collision on a cable and how do you prevent the player from hopping into the zipline if the attach point is to low to the ground or obstructed. How do you make sure the player exits the zipline before they clip into the ground if the zipline anchor point is low to the ground.
Zip Path clearance check
Vector Start: Zip line start world location.
Vector End: Zip line end world location.
We are doing a “capsule” trace using the characters dimensions at Zip angle directly below the zipline. May need height adjusts on Z and a tweak to X on start/end vectors.
End point Height check