I have a node called LeftSideBumper
, which has a custom script that should only perform some action when another object collides with a specific collider.
Therefore, in TypeScript, I added a property to specify the collider to look for:
@property(cc.PhysicsCollider)
sideCollider: cc.PhysicsCollider = null;
Now I expected to be able to bind one of the LeftSideBumper
node’s many colliders to the sideCollider
property, like I could in e.g. Unity.
However, it seems like I can only bind the whole Node to the property:
I’m moving over from Unity, so please let me know if this is not the way things are done in Cocos Creator.
In the meantime, I’ve found a workaround/solution using collider tags, but I still want to know whether it’s possible to bind a specific component to a property instead of just the whole node, which may contain multiple of the component.
Thanks in advance,
Marius