Collision Dilemma

I have a obby where you drag a ball with you throughout the course, using it to complete obstacles. I plan to add walls that only collide with the player or ball. However, i also want players to not touch eachother.

When laying out the collision groups… i really don’t have a better way to say it, but the players can touch eachother’s balls. I don’t want that, since the balls are quite heavy and are strong enough to throw you off. Another problem, the player must be able to touch it’s own ball, else the obbies can’t be completed.

Look at the collision table:
image

How can i solve this?

3 Likes

So for the sake of not laughing while typing this explanation, let’s call the balls “objects” for now :joy:

Problem

  1. The players cannot collide with each other
  2. The player cannot collide with another player’s object
  3. The player can collide with their own object
  4. Objects cannot touch other Objects (?)

Explaination
In the past, I had to create a collision group for each player, which was kind of tedious to do. With the new collision group update, I learned that you are actually able to change the collision group of a part LOCALLY :eyes: I’m not sure if that was intended, but that little hack is what I’m using in my current project to give each player their own client-sided object without coinciding with other players and their respective objects.

Solution

  1. Create a “Player” collision group and set “Player” - “Player” collision to false
  2. Create a “Ball” collision group and set “Player” - “Ball” and “Ball” - “Ball” collision to false
  3. Create a “Player Ball” collision group and set “Player” - “Player Ball” collision to true and “Ball” - “Player Ball” to collision false
  4. Locally change the collision group of the player’s ball to “Player Ball”

That way, everyone else’s object doesn’t collide with you or your object, but your object will collide with you, that is, if the collision group has been changed locally.

I will test this solution on my end and let you know if it works, perhaps provide a place file as well. I prefer to create and assign collision groups through code!

I hope this helps :smiley:

3 Likes

Lovely solution! And here was i trying to make uncountable NoCollisionConstraints for everything… :cry:

2 Likes

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