InvSpheres in Egg-files?

So, I’m using Blender as my level-builder. (Specifically, an old version, with a modified version of YABEE as my exporter.) For the most part, this has worked well–including in allowing me to specify collision geometry via “Collide” tags.

Except that I now want to specify an Inverse Sphere collision-object, and it doesn’t seem to be working.

Specifically, I have a cube that should be exporting with the following tag:
<Collide> { InvSphere descend }

When I run my program, I find the cube still present as visible geometry (thus not converted to collision geometry), and am presented with the following error:

Warning in /home/thaumaturge/Documents/My Game Projects/MoonsInCrystal/Content/BaseGame/Moons/PlantMoon/Levels/seedChamber.egg at line 2227, column 30:
        <Collide> { InvSphere, descend }
                             ^
Unknown collision solid type InvSphere,

I did find mention on the forum of the following PRC entry, but adding it as a “loadPrcFileData” line at the start of my program doesn’t seem to help.
egg-object-type-invsphere <Collide> { InvSphere descend }

Any ideas?

Are you sure that a comma is required after the collisions object type, it is not mentioned in the documentation.

Hmm, it looks like the parser adds it to the output, you need to look at the source code, maybe you can clarify something.

1 Like

Aargh, no, you’re right!

So, for a variety of other properties (ones not handled by the egg-parser, but simply as tags to be handled by my own code) I do use commas as separators.

And, in comparing what I had to what the source code had, I realised that there was indeed a comma in the Blender-side tag that I’m guessing that I had typed without thinking!

That is, I not-uncommonly have tags with values of the form: <val1>, <val2>, ...

(e.g. A shader-input tag–to be processed by my own code–with the value: “skewFactor, 2.7”)

I then had a “Collide” tag with the value: “InvSphere, descend

I’ve thus corrected this to: “InvSphere descend

And indeed the inverse-sphere works with that typo corrected!

Ah well, there it is!

Thank you for your help! :slight_smile:

1 Like