ataylor Posted March 29, 2016 Share Posted March 29, 2016 Is there an example / sample showing how to create callback for a class member function? The sample included in the SDK browser only seems to cover static functions. I can include 'this' pointer as an argument to static function and call the member function from there, but this is not ideal. Link to comment
ded Posted March 30, 2016 Share Posted March 30, 2016 Hi, I didn't found the example either, perhaps we should add one. You can do it this way: body->setContactCallback(MakeCallback(this, &AppWorldLogic::on_contact)); Link to comment
ataylor Posted March 30, 2016 Author Share Posted March 30, 2016 Works, thank you Maxim. Link to comment
silent Posted April 8, 2016 Share Posted April 8, 2016 We also slightly updated Systems/Callbacks C++ sample in 2.2.1 to show how to create callback for a class member function. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Recommended Posts