How is it possible to make those clouds like in Bubble Gum Simulator where if you're flying up you wont hit the cloud and fall down but if your on top of the cloud you can walk on it.

I could think of a way and that is just detecting if the player touches it twice then make it CanCollide = true but that is extremely bad as what if they are falling down and touch it for the first time?

It's like if they touch the bottom of the cloud they can go right through it but if they touch the top they can walk on it.

I'm not asking for any code, just a basic explanation because I'm curious how those games made it.

7 comments

0

If the player's position is under the cloud, make it CanCollide false. If the player's position is above the cloud, make it true.

0

^ this guys smart. thats a lot of clouds to be constantly checking through though.

0

I know there is a better way than to constantly loop.

0

check every time the players height changes?

0

I guess this works, but there is a problem. What if there is multiple people playing and trying to go up past the same cloud?

0

do it on the client?

0

maybe 2 parts one at the bottom touched both of them cancollide off top one nothing