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...
Смотрите видео The Door Project Game: Cable System онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь The Door Project 20 Декабрь 2021, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 1,281 раз и оно понравилось 6 людям.