Help with making the poppy playtime grabpack cable physics

Hi,

I’m currently making a poppy playtime grabpack and i came across a very important obstacle which is making the cable physics, for example: making the cable wrap around a wall instead of phasing through it.

I’m using a rod constraint as a placeholder for now because i didn’t know how to go about making the cable physics.

Any help is appreciated.
Thanks.

You’d have to find a way to detect when the cable touches something.

The way I would approach this… I would create the cable by splitting it into smaller sections of rope connected together by masslesses spheres that collide with the walls??

this would work better with low gravity aswell

1 Like

The most simple solution I can come up with is with continuous raycasts.

Raycast every single frame, when you can no longer raycast towards the hand in a direct line of sight you can split the cable in 2 and raycast from the point where it splitted recursively.

The whole basics of it is simply doing straight-line checks recursively.

When the cable gets stuck on a corner or a pole, you change the raycast point while also checking whenever the player comes back around the pole to release the arm again once more.

It works perfectly! Thanks for you help.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.