From NeoAxis 3D Engine Wiki
|Language:||English • Russian||Status:||Approved|
GeneralMapObject is intended to quickly create objects in the Map Editor. This type doesn't have any special functionality or properties. It is assumed that a user builds every object of parts by attaching various components to it. As opposed to creating map objects, there's an option to create and configure object types with further placement of those objects in the Map Editor.
Components attached to the object are:
- Billboard — a flat object always facing the camera,
- Helper — a helper object,
- Light — a light source,
- MapObject — a map object,
- Mesh — a 3D model,
- Particle — a particle system,
- Sound — sound.
Attaching components to objects is basic capability of all objects. Therefore, a user can extend any type. The feature of GeneralMapObject is it doesn't have any components attached to it, and every object of this type is configured from scratch.
For multiple use of GeneralMapObject with similar elements creating of an object type is preferred. You can learn more about this in the creating a simple object type tutorial.
Let's see how to create a GeneralMapObject object using the example of a burning barrel. The barell is a static mesh and the fire is a particle system.
Place the object on the map. You can find this type in the (Object Creation) window, in the Base\Types\Basic folder.
Initially, GeneralMapObject is an empty object functioning as a container to other objects. Let's fill it.
Select the just created object. In the properties window click the "..." button next to the Components properties.
In the opened window, in the dropdown list of the Add button select the type of an object we want to add — MapObjectComponent_Mesh.
Specify the path to the 3D model in the Mesh Name box of the Mesh property group. In our example we select a 3D model of a barrel from the Village Demo map located in the Data\Maps\VillageDemo\FarmModels\Meshes folder.
Now, we add flames to our object. In the dropdown of the Add button select MapObjectComponent_Particle. Several particle system variants to simulate fire are already included in the SDK. In the Particle property group, put the BigFireParticle particle system from the Data\Effects\FireParticle folder to the Particle System Name field. Also, raise the flame over the barrel by setting the Position Offset parameter in the _General property group to "0 0 1".
In the Component Collection Editor click OK. We have finished creating a burning barrel.
A 3D model and a particle system are just two of object types you can attach to GeneralMapObject. You could as easy add to this burning barrel the sound of fire or a light source to simulate lighting of surroundings around the fire.
GeneralMapObject is an empty dummy object and it does not have any special properties.
Properties of components that are part of the SDK is thoroughly described in the object components overview.
|Components||List of attached components.|
|LogicClass||Reference to the Logic Editor class. Read more about how to work with the Logic Editor class.|
|Tags||User defined information. Defined as key — value pairs. It is used for user's needs.|
|Type||Object type. It can not be changed.|
|Position||Object position on the map.|
|Rotation||Object rotation. The angle of rotation is set in degrees.|
|AutoVerticalAlignment||Automatical alignment by height mode. Allows to set the value among 4 variants: None (without alignment ), ByBounds (by dimensions), ByBoundsWithRotation (by dimension with possible rotation), ByCenter (by center).|
|Layer||The layer of the map these objects belong to.|