Search found 613 matches
- Sat Feb 11, 2023 10:28 am
- Forum: Extensions
- Topic: 3D Physics with ZgeBullet
- Replies: 104
- Views: 274945
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: 274945
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: 11499
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: 11499
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: 11499
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: 11499
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: 11499
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: 11499
[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...
- Wed Jan 04, 2023 4:15 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
Thanks for your help, Kjell :wink: I managed to get something working on all screens, using a FOV 90, distance 1, as you told: <?xml version="1.0" encoding="iso-8859-1" ?> <ZApplication Name="App" Caption="ZGE Screen Ratio" ClearColor="0 1 0 1" FullS...
- Wed Jan 04, 2023 11:51 am
- Forum: General discussion
- Topic: Problem with scaling a square to fit the full screen resolution
- Replies: 4
- Views: 6251
Problem with scaling a square to fit the full screen resolution
Hi, I've been having this weird problem on some screens where the background isn't properly fitting the screen size. So I made a strip down example in order to test that. Here's what I'm doing to scale the background square: BackgroundMeshSize.Scale.X = App.ScreenWidth * ScreenScale; BackgroundMeshS...
- Mon Jan 02, 2023 4:51 pm
- Forum: General discussion
- Topic: Vibrations on Android
- Replies: 3
- Views: 6585
Re: Vibrations on Android
Ok. So I would need to create a library just for shaking the Android, like rado1 did for tilting the sensors?
https://github.com/Rado-1/ZgeSensor
https://github.com/Rado-1/ZgeSensor
- Mon Jan 02, 2023 12:13 pm
- Forum: General discussion
- Topic: Vibrations on Android
- Replies: 3
- Views: 6585
Vibrations on Android
Hello. Today, I'm trying to use the code I wrote for shaking the XInput controller to also shake the Android booty. I added the permissions in the AndroidManifest.xml but I have no clues of how to access Android functions such as VIBRATOR_MANAGER_SERVICE from ZGE. I guess I have to use ZExternalLibr...
- Mon Jan 02, 2023 11:55 am
- Forum: General discussion
- Topic: How to retrieve what kind of model
- Replies: 7
- Views: 8790
Re: How to retrieve what kind of model
You are right, I can totally use CollisionBounds and ColissionOffest to do that. Thanks for the good suggestion
Edit:
Using CollisionBounds.X with 1 to number of different sounds I want to make is nice, simple and working like a charm. Thanks
Edit:
Using CollisionBounds.X with 1 to number of different sounds I want to make is nice, simple and working like a charm. Thanks
- Mon Jan 02, 2023 11:41 am
- Forum: Extensions
- Topic: XInput
- Replies: 7
- Views: 13148
Re: XInput
Years later, some players could not launch the game on Linux and I couldn't find why. After reinstalling Linux on my laptop, I discovered that it was not crashing for me because, at some point, I installed some weird XInput libraries for Linux. But with a fresh install, the game is crashing like eve...