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.
Dear forum users! In compliance with the new European GDPR regulations, we'd just like to inform you that if you have an account, your email address is stored in our database. We do not share your information with third parties, and your email address and password are encrypted for security reasons.
New to the forum? Say hello in this topic! Also make sure to read the rules.
New to the forum? Say hello in this topic! Also make sure to read the 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: 22
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: 1884
- Joined: Sun Feb 28, 2016 3:22 pm
- Title: Lead programmer
- Started SFD: Made it!
- Location: Sweden
- Gender:
- Age: 34
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