I'm all new to this game engine (and even new to every 3d thingy, for that matter), and I'm working on an easy game to get introduced.
Up until now I've been doing pretty good on my own, but now I'm working with PGButton and I'm wondering a few things.
Like, initially, everything that you put under the aspect2d node will get rendered in a position relative to the camera.
What if I don't want that ? And especially, what if I want the node to be initially placed relatively to the camera, but to stay where it is if the camera moves ?
And second question is about PGButton.
I have no problem creating buttons, but I do have some issues getting rid of them.
If I store a pointer to PGButton, when I try to delete it, the whole thing crash (claming that a virtual pure method has been called...).
Right now I get rid of the menu by removing the NodePath. But I don't think the PGButton is cleaned afterwards, is it ?
And if not, I need to delete it myself... what's the procedure to do that ? I noticed that I can't start using "delete" on the button pointer as soon as I used setup or set_frame.
I can only delete the PGButton before I create attach its node to aspect2d.
If I try deleting it right after that, I got this :
- Code: Select all
Assertion failed: _ref_count == 0 || _ref_count == local_ref_count at line 129 of built/include/referenceCount.I
game: built/include/mutexPosixImpl.I:129: void ReMutexPosixImpl::acquire(): Assertion `result == 0' failed
And if I try to do it later, I got this whole "virtual pure method called" thingy.
I thank thee for helpin !
Good day !
