Search found 1886 matches
- Mon Sep 11, 2023 8:20 pm
- Forum: General discussion
- Topic: CollisionBounds fourth value?
- Replies: 3
- Views: 22908
Re: CollisionBounds fourth value?
Hi Ats, There is a fourth value that can be set for CollisionBounds, besides X,Y and Z. So what is it? It's ( currently ) not used by any of the collision styles. How to set/get it by code? Both XYZW and RGBA can be used with any 4D vector. So in order to access the 4th component of CollisionBounds ...
- Sat Sep 09, 2023 9:20 am
- Forum: General discussion
- Topic: Tracing Floats
- Replies: 2
- Views: 20076
Re: Tracing Floats
Hi Ats, I guess it is some kind of limitation with int or float size, but I don't understand why...? A signed 32-bit integer has a range of -2147483648 to 2147483647. Which means you can safely multiply the fractional part of a float by ( up to ) 10⁸ .. so that's all fine. However, a 32-bit float us...
- Tue Jul 25, 2023 9:23 am
- Forum: General discussion
- Topic: Skybox
- Replies: 4
- Views: 21749
Re: Skybox
Hi Ats, I'm trying with a SkyCylinder, that only rotates on its X axis. It should work, but the cylinder mesh ZGE Library.xml is made out of a sphere, without texture coordinates. For your purpose you want to generate a cylinder from a 2D-grid. The normals aren't necessary ( for sky-cylinder use ) ....
- Tue Jul 25, 2023 12:39 am
- Forum: General discussion
- Topic: Skybox
- Replies: 4
- Views: 21749
Re: Skybox
Hi Ats, So I'm planning to replace the background rectangle by a skybox. But I don't know how to get rid of the visible edges and corners of the cube. Is this possible, or should I use a skysphere instead? If you want to use a skybox .. you need a texture that has been projected onto a box. Similarl...
- Wed Jul 05, 2023 3:19 pm
- Forum: General discussion
- Topic: ZGEBullet Collision Shape Viewer / Editor
- Replies: 14
- Views: 95072
Re: ZGEBullet Collision Shape Viewer / Editor
Hi Ats, I can simply retrieve the offset in my sketchup ruby script and store it with the rest, it will be easier and ready for release too. That's definetely more convenient than having to do it in ZGE. The sketchup and ZGE axis don't have the same rotation Right, there's no consensus .. software l...
- Sun Jul 02, 2023 10:15 am
- Forum: General discussion
- Topic: ZGEBullet Collision Shape Viewer / Editor
- Replies: 14
- Views: 95072
Re: ZGEBullet Collision Shape Viewer / Editor
Hi Ats, With this new method, it is simpler to export models to ZGE without having to center them, so that, as an example, the pyramid can be put on the ground by setting its Position.Z = 0, instead of Position.Z = -pyramidHeight/2. Right, it's important to place your mesh origin correctly so that y...
- Fri Jun 30, 2023 5:48 pm
- Forum: General discussion
- Topic: ZGEBullet Collision Shape Viewer / Editor
- Replies: 14
- Views: 95072
Re: ZGEBullet Collision Shape Viewer / Editor
Hi Ats, Are you you putting the transformation ( position / rotation / scale ) values in the SketchUp object names or something? Or are those simply the variable names your script generates from the object values? Anyway, for a compound shape i'd use a parent object / dummy that ( for instance ) has...
- Thu Jun 29, 2023 7:15 am
- Forum: General discussion
- Topic: ZGEBullet Collision Shape Viewer / Editor
- Replies: 14
- Views: 95072
Re: ZGEBullet Collision Shape Viewer
Hi Ats, And I rediscover why I completely stopped working on Omeganaut: setting the collision shapes is a hassle. This all comes down to preference, but for imported meshes i'd personally define the collision shape(s) in the software you're using to create them ( Blender / Maya / ??? ) and use a cus...
- Tue May 09, 2023 10:09 am
- Forum: General discussion
- Topic: Sound volume based on distance
- Replies: 4
- Views: 17982
Re: Sound volume based on distance
Hi jinxtengu, I notice that the sound ceases entirely when the player is directly over the top of the source of the sound. Is that because it's clipping a value of 1? Whoops .. forgot to abs() the result of log2() :oops: Change the volume assignment line in Cricket.OnUpdate to .. CricketSound.Volume...
- Tue May 09, 2023 9:45 am
- Forum: General discussion
- Topic: Dynamic terrain
- Replies: 6
- Views: 40693
Re: Dynamic terrain
Hi jinxtengu, Looking at the example, I see the map array is populated by random values That's just for demonstration purposes, you can just as easily populate the map array using a mesh made in Blender ( or similar ). Below is the same example as before but using the data of a exported mesh. https:...
- Mon May 08, 2023 11:11 am
- Forum: General discussion
- Topic: Dynamic terrain
- Replies: 6
- Views: 40693
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...
- Mon May 08, 2023 10:00 am
- Forum: General discussion
- Topic: Making a model rotate to face another.
- Replies: 4
- Views: 8513
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 )....
- Sun May 07, 2023 10:31 am
- Forum: General discussion
- Topic: Sound volume based on distance
- Replies: 4
- Views: 17982
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...
- Sun May 07, 2023 8:27 am
- Forum: General discussion
- Topic: Making a model rotate to face another.
- Replies: 4
- Views: 8513
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...
- Fri Apr 28, 2023 10:33 am
- Forum: General discussion
- Topic: Question about screen fade transitions.
- Replies: 4
- Views: 7909
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...