The Door Project Game: Cable System

Published: 20 December 2021
on channel: The Door Project
1,281
6

I tried to use the Cable Component of Unreal engine 4 to simulate cables/ropes.
Turned out the cable component are working well to simulate the movement of a rope but not that much (if at all) to detect collision and have the cable around other objects.

I took one day to try to implement my own system using the Cable Component as a base.

I start the rope with one Cable Actor (containing a CableComponent) that I attach to a pickup actor which player can pick up. They become 2 nodes of a chain.

At each frame I do a raycast between each 2 node, if there is a collision, I create a new Cable Actor that I add in the chain between the 2 nodes and I make the first part of the chain more straight.
Once the collision disappears between 2 nodes of the chain, I remove the last chain of the pair.

For now, this works-ish but there are still situations the rope can be stuck in a door or something like that when moving it...


Watch video The Door Project Game: Cable System online without registration, duration hours minute second in high quality. This video was added by user The Door Project 20 December 2021, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,281 once and liked it 6 people.