Search found 637 matches
- Sat Feb 18, 2023 8:25 am
- Forum: General discussion
- Topic: Recycling models, is it worth it?
- Replies: 6
- Views: 8531
Re: Recycling models, is it worth it?
hahaha, another simple yet super explicit and colorful example of yours. Thanks. For the benchmark, I'll do that when I'll finish fusing all the FX into one Model, now that I know Category can be changed without breaking everything. I'll just have to switch on/off the spool and run some tests. Regar...
- Fri Feb 17, 2023 7:21 pm
- Forum: General discussion
- Topic: Recycling models, is it worth it?
- Replies: 6
- Views: 8531
Re: Recycling models, is it worth it?
Thanks Kjell. And with the addition of ModelState, the BoxReset in Box Model can then call substates with their own initialization, which is pretty neat. <OnSpawn> <ZExpression Name="BoxReset"> <Expression> switch(CurrentModel.Box_Type) { case 0: @SetModelState(State:State_Box_Cube); break...
- Fri Feb 17, 2023 10:27 am
- Forum: General discussion
- Topic: Recycling models, is it worth it?
- Replies: 6
- Views: 8531
Re: Recycling models, is it worth it?
It freezes for a few frames on some recent phones when I spawn more than 30 enemies at a time... So I made a little working example, but I'm not happy with setting the Thing parameters in the general activateThing function. I would prefer them to be set in the model, so I don't have to search everyw...
- Thu Feb 16, 2023 7:00 pm
- Forum: General discussion
- Topic: Recycling models, is it worth it?
- Replies: 6
- Views: 8531
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: 37077
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: 284397
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: 284397
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: 284397
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: 284397
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: 284397
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: 284397
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: 12359
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: 12359
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: 12359
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: 12359
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 ...