Search found 619 matches
- Thu Feb 16, 2023 7:00 pm
- Forum: General discussion
- Topic: Recycling models, is it worth it?
- Replies: 6
- Views: 7730
Recycling models, is it worth it?
Between the enemies, the buildings, the weapons and the debris, I have a lot of models being created and destroyed all the time in my game. So I was wondering if I should keep it that way, or if it would be better to recycle them. I guess it would consist of adding the created models in an array, an...
- Wed Feb 15, 2023 4:51 pm
- Forum: Bug reports
- Topic: Why asking for save after building for Android?
- Replies: 0
- Views: 35084
Why asking for save after building for Android?
It's not really a bug, but rather an improvement, as the current behavior is a bit weird: Here's the repro: Open a project Don't change anything Build for Android Try to close the project Result: it's marked as changed, even if that's not the case, and it wants to be saved. That does not happen when...
- Tue Feb 14, 2023 9:30 am
- Forum: Extensions
- Topic: 3D Physics with ZgeBullet
- Replies: 104
- Views: 275246
Re: 3D Physics with ZgeBullet
So in case you need to know which model a body belongs to on collision, make sure you use zbtSetUserModel so Bullet can tell you. But that is my whole problem: Only zbtRayTest returns a collision object, that can be reverted to a Model, using zbtGetUserModel (and obviously zbtSetUserModel when I at...
- Mon Feb 13, 2023 6:54 pm
- Forum: Extensions
- Topic: 3D Physics with ZgeBullet
- Replies: 104
- Views: 275246
Re: 3D Physics with ZgeBullet
Oh, you are totally right, now I understand my mistake :lol: But still, I was expecting ZgeBullet to be capable of retrieving what objects are simply colliding, since it can do that with a zbtRayTest followed by zbtGetUserModel. Right now, since there are a lot of lasers, enemies and other objects, ...
- Mon Feb 13, 2023 4:41 pm
- Forum: Extensions
- Topic: 3D Physics with ZgeBullet
- Replies: 104
- Views: 275246
Re: 3D Physics with ZgeBullet
Not sure if you're referring to the ZgeBullet docs or the ZGameEditor docs, but this should be common knowledge in ZGE. I'm referring to the ZgeBullet doc. Since it's an external library, I didn't expect the zbtIsCollidedWith function to only work with reference model. For the rest, I'm not sure to...
- Mon Feb 13, 2023 9:53 am
- Forum: Extensions
- Topic: 3D Physics with ZgeBullet
- Replies: 104
- Views: 275246
Re: 3D Physics with ZgeBullet
Oh, all right. So with models spawned as reference, the test is running correctly. It's good to know, as it isn't explained in the doc. But that doesn't help me find when a (clone) laser has touched a (clone) enemy. Actually, I test if the laser has touched something (enemy, wall...) and then the la...
- Sat Feb 11, 2023 10:28 am
- Forum: Extensions
- Topic: 3D Physics with ZgeBullet
- Replies: 104
- Views: 275246
Re: 3D Physics with ZgeBullet
After a bit of tests, the if ((coA == objA && coB == objB) || (coA == objB && coB == objA)) { never works, and the problem seems to be coming from btPersistentManifold* pm = gCurrentWorld->dispatcher->getManifoldByIndexInternal(i); btCollisionObject* coA = const_cast<btCollisionObjec...
- Wed Feb 08, 2023 9:14 pm
- Forum: Extensions
- Topic: 3D Physics with ZgeBullet
- Replies: 104
- Views: 275246
Re: 3D Physics with ZgeBullet
Hello, I'm back to ZgeBullet, and I'm currently trying to simply detect what object my sphere is colliding with. The notice looks pretty straight forward: @fn int zbtIsCollidedWith( xptr objA, xptr objB) @brief Are the specified collision objects collided? @param objA pointer to collision object A @...
- Sun Jan 08, 2023 6:29 pm
- Forum: General discussion
- Topic: [Solved] Detecting generic Gamepad D-Pad on Android
- Replies: 9
- Views: 11503
Re: Detecting generic Gamepad D-Pad on Android
Everything was broken, so I reverted all, but it turns out it was because I removed one android lib by mistake... So, with MAX_AXES = 10; and the addition of NativeSetJoyAxisValue(controllerNb, 8, // MotionEvent.AXIS_HAT_X event.getAxisValue(MotionEvent.AXIS_HAT_X)); NativeSetJoyAxisValue(controller...
- Sat Jan 07, 2023 9:28 pm
- Forum: General discussion
- Topic: [Solved] Detecting generic Gamepad D-Pad on Android
- Replies: 9
- Views: 11503
Re: Detecting generic Gamepad D-Pad on Android
Maybe I need to add the MotionEvent.AXIS_HAT_X and MotionEvent.AXIS_HAT_Y values in Zge.java ? private native void NativeSetJoyAxisValue(int joyId, int axisNr, float value); (...) // joystick if ( (event.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK ) != 0) { int controllerNb = getControllerNu...
- Sat Jan 07, 2023 8:20 pm
- Forum: General discussion
- Topic: [Solved] Detecting generic Gamepad D-Pad on Android
- Replies: 9
- Views: 11503
Re: Detecting generic Gamepad D-Pad on Android
Thanks, that was a super helpful hint. So if hat is just a joystick axis, then I should be able to simply retrieve: joyX = joyGetAxis(0,15); // 0x0F joyY = joyGetAxis(0,16); // 0x10 Unfortunately, joyGetAxis() prevents to get an axis bigger than MAX_AXES = 6; function Platform_GetJoystickAxis(JoyId ...
- Sat Jan 07, 2023 1:25 pm
- Forum: General discussion
- Topic: [Solved] Detecting generic Gamepad D-Pad on Android
- Replies: 9
- Views: 11503
Re: Detecting generic Gamepad D-Pad on Android
All right. But why is it returning an angle when all gamepads' hat works with two axis, just like a joystick? Doesn't the Nintendo Switch Ville talked about in his ChuckieEgg example work like that? I'll see how the joystick work in the source and if I can add the hat for Android when I'll get home ...
- Sat Jan 07, 2023 8:36 am
- Forum: General discussion
- Topic: [Solved] Detecting generic Gamepad D-Pad on Android
- Replies: 9
- Views: 11503
Re: Detecting generic Gamepad D-Pad on Android
With a lot of different USB dongles in chain in order to plug the gamepads for testing on Android, and some sideloading too, here are the results of my research on D-Pad: Axis 0x0f HAT_X / Axis 0x10 HAT_Y Retroid Pocket 3+ XBox Controller NVidia Shield TV controller Axis 0x00 AXIS X / Axis 0x01 AXIS...
- Fri Jan 06, 2023 10:52 pm
- Forum: General discussion
- Topic: [Solved] Detecting generic Gamepad D-Pad on Android
- Replies: 9
- Views: 11503
[Solved] Detecting generic Gamepad D-Pad on Android
Hello. Today, I'm debugging the Gamepad D-Pad on Android. I remember it worked on OUYA years ago, maybe because they were buttons. Turns out that on most generic gamepads, they are not buttons, nor an axis, but a hat... (I used the app Gamepad Tester to list all the gamepad buttons). So I'm wonderin...
- Wed Jan 04, 2023 4:36 pm
- Forum: General discussion
- Topic: Problem with scaling a square to fit the full screen resolution
- Replies: 4
- Views: 6251
Re: Problem with scaling a square to fit the full screen resolution
Oh :oops: Of course, it was coming from App.CameraPosition.Z I made so much copy and paste from one project to another for trying out the android devices that I completely messed up... As for the rest, I'll re-read everything tomorrow after a good night of sleep. That 0.25 thing out of nowhere kille...