HammeritePropModel
Core: entities. Inherits HammeritePointEntityNode3D < Node3D
A model placed in a map (entity type prop_model): a crate, a statue, a barrel.
Its model is a name looked up in HammeriteModelLibrary; collision gives it a trimesh collider; it turns about all three axes and can be sized. It is drawn with the brush shader and lit by a lightmap of its own from the bake, at lightmap_scale units a texel. A model material may be dressed per prop through a texture_key_prefix() property. HammeriteMap3D hides its mesh while no room it stands in is in view; its collider stays. Loading a model writes its bounds into the entity's _aabb, unsignalled: the box is the model's to say, and picking, the 2D views and the navigation bake read it from the entity, with no node to ask - so it is saved with the map, and a map opened where the model is missing still has props that can be found and picked.
Methods
| Returns | Method |
|---|---|
void | _set_room_seen(seen: bool) virtual |
ShaderMaterial | brush_material() static |
Mesh | get_mesh() const |
void | set_map_3d(map_3d: HammeriteMap3D) |
void | set_room_seen(seen: bool) |
String | texture_key_prefix() static |
Method descriptions
_set_room_seen()
func _set_room_seen(seen: bool) -> void
Told after set_room_seen(), for a prop of a game's own that wants to know.
brush_material()
static func brush_material() -> ShaderMaterial
The brush shader material each of the model's surfaces is drawn with a copy of.
get_mesh()
func get_mesh() -> Mesh
The model as HammeriteModelLibrary found it, or null before one loads: the one mesh every prop of that model shares, so read it and do not change it. What the bake lays the prop's lightmap over.
set_map_3d()
func set_map_3d(map_3d: HammeriteMap3D) -> void
Taken from HammeriteMap3D as the node is built: where the prop's baked UV2 and lightmap are read from, and who is told when it moves.
set_room_seen()
func set_room_seen(seen: bool) -> void
Whether the prop is drawn, as HammeriteMap3D says while it shows only the rooms the game's camera can see: its mesh alone, so what it stops and what stands on it are where they were. A script's _set_room_seen() is told after.
texture_key_prefix()
static func texture_key_prefix() -> String
What a prop names another texture for one of its model's materials under: texture/ and the material's name, lower-case and without an extension - texture/replace0 for a material called REPLACE0.GIF. A model made to be dressed differently wherever it stands - a door, a banner, a painting - has such a material, and each prop says what goes on it; the value is a texture's name, as a face's is.