steve3d Posted September 15, 2011 Share Posted September 15, 2011 I have multiple doors, and I want to use a WorldTrigger to controll each doors open and close, of course it's a same callback on each WorldTrigger. But how can I know which trigger triggered the callback? Link to comment
steve3d Posted September 15, 2011 Author Share Posted September 15, 2011 I've studied passage demo, the callback function are declared as this void parking_doors_callback(Node node,WorldTrigger trigger) and the document said The callback function should be able to accept a node as an argument, but in the function there is no usage of argument node. is this the standard format of callback to WorldTrigger? document didn't say it clearly. Link to comment
steve3d Posted September 15, 2011 Author Share Posted September 15, 2011 well, after some test, the default callback for WorldTrigger should be void trigger_callback(Node n, WorldTrigger t) Node is the object cause trigger to fire callback, and the second argument is the actual trigger that triggers the callback, but document didn't say anything about this, I think it will be better that the document could clarify this. Link to comment
manguste Posted September 21, 2011 Share Posted September 21, 2011 Sure! Thank you for pointing it out, info has been added. Link to comment
Recommended Posts