Search found 1876 matches

by Kjell
Mon May 08, 2023 11:11 am
Forum: General discussion
Topic: Dynamic terrain
Replies: 6
Views: 38682

Re: Dynamic terrain

Hi jinxtengu, So lets say for example that we created a hilly landscape in blender and then imported it into z game editor. Now how would we then go about calculating some sort of hit detection based on angle of vertices? The first obstacle you'll encounter is that you can't easily access the vertex...
by Kjell
Mon May 08, 2023 10:00 am
Forum: General discussion
Topic: Making a model rotate to face another.
Replies: 4
Views: 7663

Re: Making a model rotate to face another.

Hi jinxtengu, Why is float integer of A2 divided by PI times 0.5? Why not just divide it by PI, to get 360 degrees. Why is the 0.5 necessary on the end? Because the atan2 result has a range of -PI to PI, once you divide it by PI the range becomes -1 to 1 .. which is a range of 2 ( 1 minus -1 is 2 )....
by Kjell
Sun May 07, 2023 10:31 am
Forum: General discussion
Topic: Sound volume based on distance
Replies: 4
Views: 16784

Re: Sound volume based on distance

Hi jinxtengu, I wanted to find a way to code Sound effects so that the volume of a sound is louder the closer one is to the object which is emitting the sound. Simply calculate the distance between the sound source / emitter and the camera and set the sound volume accordingly. Here's a example ( pre...
by Kjell
Sun May 07, 2023 8:27 am
Forum: General discussion
Topic: Making a model rotate to face another.
Replies: 4
Views: 7663

Re: Making a model rotate to face another.

Hi jinxtengu, I have some idea about how this needs to be done, but I still struggle with intuitively understanding how to use trigonometric functions. The first thing you need to realize is that atan2 returns a value between -PI and PI. Since ZGE uses units / cycles for rotations ( a value of 1 rep...
by Kjell
Fri Apr 28, 2023 10:33 am
Forum: General discussion
Topic: Question about screen fade transitions.
Replies: 4
Views: 7072

Re: Question about screen fade transitions.

Hi jinxtengu, Btw I was wondering, will this work with a material that is used as a font, so as to create the effect of a text fading away into transparency? Sure, here's a simple demonstration. <?xml version="1.0" encoding="iso-8859-1" ?> <ZApplication Name="App" Capti...
by Kjell
Thu Apr 27, 2023 1:29 pm
Forum: General discussion
Topic: Question about screen fade transitions.
Replies: 4
Views: 7072

Re: Question about screen fade transitions.

Hi jinxtengu, So to do fades in the past, I was placing an object in front of the camera, with a simple animation an an alpha channel. That should still work. Not sure what you're doing wrong that makes it work no longer. Anyway, how you implement it in your project completely depends on your own pr...
by Kjell
Thu Apr 20, 2023 2:30 pm
Forum: Feature requests
Topic: Edit XML with an external editor
Replies: 13
Views: 62459

Re: Edit XML with an external editor

Hi Ats, Mostly, having to deploy the component tree in order to select the right thing to display a lot of lines of code into the little ZGE code editor. Gotcha .. would be convenient if there was the option to use a external file with ZExpression / ZLibrary / BitmapFromFile / MeshImport etc. just l...
by Kjell
Thu Apr 20, 2023 12:18 pm
Forum: Feature requests
Topic: Edit XML with an external editor
Replies: 13
Views: 62459

Re: Edit XML with an external editor

Hi Ats, My game is slowly becoming huge for only one file, even if I comment everything in order to find what and where things are... Can you elaborate on what difficulties you're experiencing because your project is so huge? Something like: ZGameEditor.exe -b pathTo/myProject.zgeproject pathTo/myPr...
by Kjell
Wed Apr 19, 2023 7:11 pm
Forum: Feature requests
Topic: A display of the collision box on model preview
Replies: 2
Views: 5306

Re: A display of the collision box on model preview

Hi jinxtengu, I seem to recall that this used to be a feature, but maybe I am mis-remembering. You're correct, simply enable the "Bounds" checkbox when previewing a model. https://i.imgur.com/F7FU1na.png And if you leave the checkbox enabled, it will show collision bounds while previewing ...
by Kjell
Tue Apr 18, 2023 1:53 pm
Forum: General discussion
Topic: Disabling Fog per model?
Replies: 2
Views: 5104

Re: Disabling Fog per model?

Hi jinxtengu, I was wondering if anyone knows an easy way to do this? Sure, you can simply use glEnable(GL_FOG) / glDisable(GL_FOG) :) Below is a simple example of a scene that contains a bunch of boxes ( that have fog enabled ) and a sky-box ( that has fog disabled ). The sky-box doesn't follow the...
by Kjell
Fri Feb 17, 2023 8:05 pm
Forum: General discussion
Topic: Recycling models, is it worth it?
Replies: 6
Views: 7550

Re: Recycling models, is it worth it?

Hi Ats, As I was merging all my FX into only one Model, I realized that some FX have a different RenderOrder or Category number, in order to display them correctly. Can I simply change those settings in the ModelStates, or will it change all the FX models in game, regardless of their ModelState? Nev...
by Kjell
Fri Feb 17, 2023 11:14 am
Forum: General discussion
Topic: Recycling models, is it worth it?
Replies: 6
Views: 7550

Re: Recycling models, is it worth it?

Hi Ats, 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 everywhere for that bit of code. But I can't seem to find how to simply do that :? If you only ...
by Kjell
Thu Feb 16, 2023 9:23 pm
Forum: General discussion
Topic: Recycling models, is it worth it?
Replies: 6
Views: 7550

Re: Recycling models, is it worth it?

Hi Ats, So, do you guys think it is worth doing that, or is it just a waste of time? If you're experiencing hiccups during gameplay due to models being spawned, recycling models can certainly be a relatively easy remedy. However, if your game already runs completely smooth at the desired framerate o...
by Kjell
Tue Feb 14, 2023 12:08 pm
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 104
Views: 271002

Re: 3D Physics with ZgeBullet

Hi Ats, I don't find any other way to retrieve the collided object, as every other ZgeBullet functions returns an int or a void. For those kind of situations i think zbtGetNumOverlappingObjects and zbtGetOverlappingObject ( which returns a btCollisionObject ) are intended. But that's the beauty of o...
by Kjell
Mon Feb 13, 2023 7:18 pm
Forum: Extensions
Topic: 3D Physics with ZgeBullet
Replies: 104
Views: 271002

Re: 3D Physics with ZgeBullet

Hi Ats, 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. Bullet can tell you which objects / bodies have collided, but that's not very helpful in most circumstances. ZGE doesn't know what Bull...