This can also be found on my wordpress, but I’ll repeat it here.
Blender has a feature, in the object physics, called collision groups. This allows you to put an object in one or more collision croups, and also dictate what collision groups they can collide with.
The collision group it what group, or groups the object is in; while the collision mask dictates the object groups that object can collide with. You can use this feature to simulate the block physics found in minecraft and terreria.
Here I’ll give you some exaples of things you could do with this feature.
- You could create a shield that blocks debris, but allows the player to pass through.
Put the shield in group one and debris in group three, allow the debris to interact with groups one and two, and put the player into group 2, allowing the player to interact with group three, but not one.
- Water, gravel, or sand which is similar to the shield. Put the water into group two, and allow it to interact with anything other than the player group.
You can use a ray or radar sensor to test for collisions between non-interacting groups, but collision, near, and touch sensors are pretty useless.
I’ll be exploring this feature in more depth, but until then here is a basic explanation.