Search found 1876 matches

by Kjell
Mon Feb 13, 2023 5:24 pm
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 104
Views: 270887

Re: 3D Physics with ZgeBullet

Hi Ats, Since it's an external library, I didn't expect the zbtIsCollidedWith function to only work with reference model. No no, it works with clones as well. The mistake you made doesn't have anything to do with external libraries, it's a regular ZGE mistake. What i tried to explain is that in your...
by Kjell
Mon Feb 13, 2023 11:56 am
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 104
Views: 270887

Re: 3D Physics with ZgeBullet

Hi Ats, So with models spawned as reference, the test is running correctly. It's good to know, as it isn't explained in the doc. Not sure if you're referring to the ZgeBullet docs or the ZGameEditor docs, but this should be common knowledge in ZGE. Take a look at the example below. It spawns a blue ...
by Kjell
Sat Feb 11, 2023 12:50 pm
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 104
Views: 270887

Re: 3D Physics with ZgeBullet

Hi Ats, Had a quick look at the Sphere VS Cylinder example you posted ( should have done that sooner ). You're using the Body xptr of ObjectModel in the ZExpression of SphereModel. You can only do that when ObjectModel is spawned as a reference. But since you're spawning it as a clone, that basicall...
by Kjell
Thu Feb 09, 2023 9:13 pm
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 104
Views: 270887

Re: 3D Physics with ZgeBullet

Hi Ats, Do I do something wrong, or do you think there is a problem in ZgeBullet source code ? At the very least, the code that is commented out in zbtIsCollidedWith shouldn't be commented out. As previously established, using validContactDistance might appear superfluous when testing with only axis...
by Kjell
Wed Feb 08, 2023 6:10 pm
Forum: General discussion
Topic: A Shader code for a flat surface?
Replies: 2
Views: 5403

Re: A Shader code for a flat surface?

Hi jinxtengu, So I need a shader code that can be applied to a single surface, that either blurs the texture, or fades it to a set color, when it is far away from the player. You don't necessarily need a shader to do that. In some cases you might be able to get away with simply manipulating the text...
by Kjell
Sat Jan 07, 2023 11:59 pm
Forum: General discussion
Topic: [Solved] Detecting generic Gamepad D-Pad on Android
Replies: 9
Views: 11249

Re: Detecting generic Gamepad D-Pad on Android

Hi Ats, I could augment MAX_AXES or simply remove the test, but I wonder why there is this test in the first place. Since we pass the JoyId and Axis manually to the function, why limiting this number? Because ZGE allocates a block of memory to hold the values for MAX_AXES amount of axes. If you'd re...
by Kjell
Sat Jan 07, 2023 2:12 pm
Forum: General discussion
Topic: [Solved] Detecting generic Gamepad D-Pad on Android
Replies: 9
Views: 11249

Re: Detecting generic Gamepad D-Pad on Android

Hi Ats, But why is it returning an angle when all gamepads' hat works with two axis, just like a joystick? It's up to the manufacturer ( and driver programmer specifically ) to decide how they want to represent their D-Pad in any particular API. As you noticed in your research, there's no consensus....
by Kjell
Sat Jan 07, 2023 11:28 am
Forum: General discussion
Topic: [Solved] Detecting generic Gamepad D-Pad on Android
Replies: 9
Views: 11249

Re: Detecting generic Gamepad D-Pad on Android

Hi Ats, For starters, is a hat a POV? POV stands for point-of-view control or point-of-view hat. I suspect Ville adopted this term from the WinMM API. Maybe we should add some explanations in the ZGE's help regarding the use of joyGetPOV? There's not much to it .. it returns the angle of the POV hat...
by Kjell
Wed Jan 04, 2023 4:28 pm
Forum: General discussion
Topic: Problem with scaling a square to fit the full screen resolution
Replies: 4
Views: 6113

Re: Problem with scaling a square to fit the full screen resolution

Hi Ats, Ehm .. there's no RefreshContent in that example. And you're using the App.CameraPosition.Z in the calculation instead of the active camera ( CameraBG ). But once you use a FOV of 90 with a distance of 1 you don't need the calculation anymore, all you need is .. BackgroundMeshSize.Scale.X = ...
by Kjell
Wed Jan 04, 2023 1:04 pm
Forum: General discussion
Topic: Problem with scaling a square to fit the full screen resolution
Replies: 4
Views: 6113

Re: Problem with scaling a square to fit the full screen resolution

Hi Ats, What I am doing wrong? If you want to scale the background mesh to fill the screen in the setup you're using in your example then you can do the following: <?xml version="1.0" encoding="iso-8859-1" ?> <ZApplication Name="App" Caption="ZGE Screen Ratio"...
by Kjell
Mon Jan 02, 2023 12:43 pm
Forum: Extensions
Topic: XInput
Replies: 7
Views: 12879

Re: XInput

Hi Ats, 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 everyone else. Right, calling external functions of which the DLL isn't present w...
by Kjell
Mon Jan 02, 2023 11:51 am
Forum: General discussion
Topic: How to retrieve what kind of model
Replies: 7
Views: 8583

Re: How to retrieve what kind of model

Hi Ats, I understand why you are doing that, but having it working in preview and not in release is a bit confusing :? There are quite a few functions that are only available from the IDE ( or Visualizer ) and not in a standalone. Personally i think this is totally fine and isn't too difficult to le...
by Kjell
Tue Dec 27, 2022 2:15 pm
Forum: General discussion
Topic: Fickering issues on some Android devices
Replies: 16
Views: 17792

Re: Fickering issues on some Android devices

Hi Ats, Here's what I'm doing Alright, that's perfectly fine & normal. Is the vec4(position, 1.0) necessary? Nope, that's not necessary. Internally ZGE uses vec3 for vertex positions, but when you define the attribute as vec4 in your vertex shader it automatically fills the position.w component ...
by Kjell
Tue Dec 27, 2022 12:07 pm
Forum: General discussion
Topic: Fickering issues on some Android devices
Replies: 16
Views: 17792

Re: Fickering issues on some Android devices

Hi Ats, The drawing distance is 500. And Things appears at a distance of 600 to avoid suddenly poping out of the fog. In the 256-512 range the smallest interval that can be expressed using a half-float is 0.25. Whether that's a problem or not depends entirely on your situation. Do keep in mind that ...
by Kjell
Mon Dec 26, 2022 12:35 pm
Forum: General discussion
Topic: Fickering issues on some Android devices
Replies: 16
Views: 17792

Re: Fickering issues on some Android devices

Hi Ats, ChatGPT is pretty impressive, but it's certainly not perfect ( yet ). Avoid using uniform arrays if possible. Instead of using a uniform matrix for the light position, light color ambient, and fog color, you could use individual uniform variables for each of these values. This would reduce t...