Closed rlidwka closed 1 year ago
Seems sensible for me as described here -- feel free to open a PR with the changes.
I noticed this callback is set up in the examples but never actually used. If you have a use-case, can you maybe extend the examples (ball_physx.rs)? Would help catch regressions in the future too.
Seems sensible for me as described here -- feel free to open a PR with the changes.
done
I noticed this callback is set up in the examples but never actually used. If you have a use-case, can you maybe extend the examples (ball_physx.rs)?
There is no actual use-case yet.
I can put a debug-print whenever ball is put to sleep, but I'm not sure how useful it would be.
Description of the problem
I'm trying to register
on_wake_sleep
callback, which has the following signature:ActorMap as of now has the following implementation (link):
Please notice that every single method in
ActorMap
requires&mut self
, butWakeSleepCallback
only gives access to&self
, thus making wake_sleep callback unusable as is.Any physx user can of course cast pointers by herself similar to how ActorMap does it internally, but that's not ideal.
Proposed solution
cast_map
andas_*
tocast_map_mut
andas_*_mut
respectively.cast_map
andas_*
functions which take&self
and returnOption<&self>
For example: