Search found 1985 matches

by Kjell
Tue Feb 24, 2026 1:44 pm
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 110
Views: 616188

Re: 3D Physics with ZgeBullet

Hi zakkwylde, So we have to still switch to euler for camera postioning. No, converting to euler isn't needed. In case you prefer not to .. simply remove the matrixToEuler conversions, store the results of quaternionToMatrix as mat4 variables and apply them using setMatrix just like i did in previou...
by Kjell
Fri Feb 20, 2026 10:15 pm
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 110
Views: 616188

Re: 3D Physics with ZgeBullet

Hi zakkwylde, I have been trying to get the camera to move in the direction it is facing but even though it can move, it is never in the direction i want. Below is a simple* example. *I ended up converting the quaternion matrix to euler-angles ( instead of manipulating the modelView matrix directly ...
by Kjell
Thu Feb 12, 2026 4:42 pm
Forum: General discussion
Topic: Testing ZGE speed on PC VS Android
Replies: 5
Views: 2676

Re: Testing ZGE speed on PC VS Android

Hi Ats,

Try limiting the PC build to 60fps ( and switching your monitor to 60Hz ) to see if there's still a difference in "difficulty". At 164fps input lag will probably be significantly lower than on your phone.

K
by Kjell
Thu Jan 22, 2026 10:55 am
Forum: Tips'n'Tricks
Topic: Trails
Replies: 13
Views: 19976

Re: Trails

Hi Ats, I wonder how they manage to handle the looping, though. Here's a quick & dirty example of a looping .. <?xml version="1.0" encoding="iso-8859-1" ?> <ZApplication Name="App" Caption="ZGameEditor application" FileVersion="2"> <OnLoaded> <Sp...
by Kjell
Wed Jan 21, 2026 5:22 pm
Forum: Tips'n'Tricks
Topic: Trails
Replies: 13
Views: 19976

Re: Trails

Hi Ats, Not just breezes in a distance. Would the stretched bitmap work in that case? Just double-checked it .. and they use the exact same meshes & texture for up-close wind trails. The only reason it looks slightly different in the distance is because of the depth-of-field effect applied to pi...
by Kjell
Mon Jan 19, 2026 2:14 pm
Forum: Tips'n'Tricks
Topic: Trails
Replies: 13
Views: 19976

Re: Trails

Hi Ats, Should I go with RenderNet or a MeshExpression? Probably neither .. i suspect you're trying to do something like in Wind Waker? https://i.imgur.com/zZ0a3dj.gif Just use a static mesh and animate the texture matrix. The only downside is that in ZGE you can't render a part of a mesh ( without ...
by Kjell
Mon Jan 19, 2026 11:18 am
Forum: Tips'n'Tricks
Topic: Trails
Replies: 13
Views: 19976

Re: Trails

Hi Ats,
Ats wrote: Mon Jan 19, 2026 9:13 amBut since your effect is made of pure openGL functions, I don't know if it is compatible with ES2/GL3.
I just double-checked my example .. but it doesn't use any OpenGL calls? So i'm a little confused by your response :?

K
by Kjell
Sun Jan 04, 2026 8:33 pm
Forum: General discussion
Topic: How to mirror a mesh without getting its faces upside down?
Replies: 4
Views: 7945

Re: How to mirror a mesh without getting its faces upside down?

Hi Ats, Do I have to recalculate the TexCoord manually? Simply swap the x and y components of the texture coordinates. For example, something like this: <?xml version="1.0" encoding="iso-8859-1" ?> <ZApplication Name="App" Caption="ZGameEditor application" Fil...
by Kjell
Sun Jan 04, 2026 1:07 pm
Forum: General discussion
Topic: How to mirror a mesh without getting its faces upside down?
Replies: 4
Views: 7945

Re: How to mirror a mesh without getting its faces upside down?

Hi Ats, I can mitigate the problem by using a DrawBackFace material, and everything looks correct You don't want to enable DrawBackFace when it's not ( really ) needed. I was wondering if there is some OpenGL “magic” to do the mirroring properly? You can toggle the "winding" between clockw...
by Kjell
Fri Jan 02, 2026 4:00 pm
Forum: General discussion
Topic: How to access external var from MeshExpression
Replies: 2
Views: 5669

Re: How to access eternal var from MeshExpression

Hi Ats,

Not exactly sure why your example doesn't work ( might be a bug ) ... since "const float VALUE = 0.5;" for instance does work.

K
by Kjell
Sun Dec 28, 2025 11:14 pm
Forum: General discussion
Topic: I might have been using the light position wrong in my shaders from the start
Replies: 15
Views: 19414

Re: I might have been using the light position wrong in my shaders from the start

Hi Ats, After a lot of testing, I just discovered the hard way that using glUniform3f to pass the light direction to shaders only works if the material used immediately before is using the same shader. Exactly, glUniform3f sets the value of a uniform variable of the shader program that is currently ...
by Kjell
Sun Dec 28, 2025 11:42 am
Forum: General discussion
Topic: Hotswapping Bitmaps
Replies: 2
Views: 4534

Re: Hotswapping Bitmaps

Hi Ats, I was wondering if I need to create a Material per Bitmap, or if I can hot-swap bitmaps on a single Material during the rendering of the scene. To make your example work the only thing you need to add is another UseMaterial before your UseMaterial. That's because when you switch to a materia...
by Kjell
Mon Dec 22, 2025 1:51 pm
Forum: General discussion
Topic: I might have been using the light position wrong in my shaders from the start
Replies: 15
Views: 19414

Re: I might have been using the light position wrong in my shaders from the start

Hi Ats, I can't seem to find a better way than using OpenGL calls :lol: Yea .. the fact that the ShaderVariable component doesn't support any kind of vector isn't very convenient. So, you either need to split your vector into individual floats, or pack them into a matrix, or use an array / texture. ...
by Kjell
Fri Dec 19, 2025 1:22 pm
Forum: General discussion
Topic: I might have been using the light position wrong in my shaders from the start
Replies: 15
Views: 19414

Re: I might have been using the light position wrong in my shaders from the start

Hi Ats, Should I also pass App.AmbientLightColor with the hack to a handle, or is it better to stick with a ShaderVariable mat4 ambientLightColor? Ehm .. the hack i was referring to isn't that i'm using glGetUniformLocation & glUniform3f to pass the vec3 uniform, it's using a Dummy model to nega...
by Kjell
Tue Dec 16, 2025 8:23 pm
Forum: General discussion
Topic: I might have been using the light position wrong in my shaders from the start
Replies: 15
Views: 19414

Re: I might have been using the light position wrong in my shaders from the start

Hi Ats, How did you know you needed to do that for it to work? I guess it's just one of those basic 3D engine knowledge things? Isn't it easier to expose the view matrix in ZGE source code? Probably? It's certainly the preferred solution. Is this hack better than using the fragment shader? Those are...