Singapore-MIT GAMBIT Game Lab spacer
spacer New Entries Archives Links subheader placeholder
left edge
Perception = true

So development with Visual3D is actually going relatively smoothly now (sort of).

I was having a problem with creating the halo object for the game. I was trying to create an object that would trigger an event whenever the player walked over it (ie intersected with its bounding box). I was creating an object like normal: create it, set it's position, add it to the scene. This however, was not working.

I posted to the forum and a Visual3D developer helped me out! It turns out that I was creating the object incorrectly (my original was was technically correct, but a bug in Visual3D was causing the problem). The new way also involved adding my object to the assets library of the main Visual3D architect program.

The other problem was discovered by Drew who suggested looking for some sort of flag that would tell it what entities to "percept". It turns out that buried in the object was an item called EntityFlags.perception which when set to true, allowed the objects to be percepted. I set this to true and followed the advice of the developer and it works!


Creating the object:

// These two lines are the ones I used instead of halo = new Halo()
// and halo.Spatial.RelativePosition = new Vector3(-10f, 0f, 20f)
halo = (Halo)SEntitySystem.Create("halo", "Halo", new Vector3(-10f, 0f, 20f));
halo.Enter += new IntersectEventHandler(HaloEnter);

halo.Name = "halo";
this.Spatial.AddChild(halo); // Adds the object to the scene
halo.Enter += new IntersectEventHandler(HaloEnter); // Adds the trigger event
halo.IsFlagActive = true;
halo.IsVisible = true;

The other changes I had to make:
add the line:
this.EntityFlags.Perceptible = true;
to the OnActivated() function of my main character's class.

right click on the entities folder of the Asset Library in the main architect. The context menu that pops up has "Add Custom Type". Select that and add Halo as a new type.

right edge
bottom curves