I have this weapon we can call “bubble” and the player “player”.
I’ve tried different stuff with OnTriggerEnter and OnCollisionEnter inside bubble to check if its the player colliding, or something else. If it is the player hitting the bubble, I don’t want any physic calculations to be done, else it should apply to the colliding object as well as the bubble like normal.
Can this be achieved? How?
obj.layer = number;
You set up your objects on different layers, and in physics options there’s a collision tree where you specify which layers collide with others, so you can easily at any point prevent a ball from colliding with another ball, but still collide with the level.
I do this in my app:
layer 20 is level
layer 21 is ball to ball
layer 22 is ball to level
Then you set up your collision tree and so forth. Then in game, just change the object’s layer to change or remove physics for a specific case.