Hello,
Is it possible to make an object collide only with the objects I want?
For example:
I want an InvisibleBlock to only collide with players, but nothing else, and another one to collide with everything except players.
This forum is locked and will eventually go offline. If you have feedback to share you can find us in our Discord channel "MythoLogic Interactive" https://discord.gg/nECKnbT7gk
Forum rules
Forum rules
Is there any way to make an object collide only with objects I want?
Forum rules
By using the forum you agree to the following rules.
By using the forum you agree to the following rules.
- Pricey
- Superfighter

- Posts: 399
- Joined: Thu May 05, 2016 9:29 pm
- SFD Alias: (LM) Pricey
- Started SFD: August 2015
- Location: United Kingdom
- Gender:
- Age: 24
You know you would really benefit from looking in the map editor yourself, there is literally a tutorial map AND a help section that answers this question for you.
0 x
- Gurt
- Lead Programmer

- Posts: 1887
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 36
Use the IObject.GetCollisionFilter() and IObject.SetCollisionFilter(...) respectively as you need. This is advanced topic and you need to know how the Box2D engine works and operate with their categorybits and maskbits. You will also have to analyze which bits you need to change and how based on how you want the collision to be altered. SFD uses a lot of different collision categories for different purposes.
I recommend that you do not alter default collision behavior for any tile unless you have a very good reason to do so.
I recommend that you do not alter default collision behavior for any tile unless you have a very good reason to do so.
0 x
Gurt