Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
trs:meshes_models [2020/05/24 19:53] – [Static Meshes] zdimensiontrs:meshes_models [2021/02/09 16:08] (current) – [Meshes] stohrendorf
Line 26: Line 26:
 { {
     tr_vertex Centre;     tr_vertex Centre;
-      int32_t CollRadius;+      int16_t CollRadius; 
 +     uint16_t Flags;                 // 0x01 for Flat Shaded, i.e. Normals should not affect lighting
  
       int16_t NumVertices;           // Number of vertices in this mesh       int16_t NumVertices;           // Number of vertices in this mesh
Line 51: Line 52:
 }; };
 </code> </code>
-''%%Centre%%'' is usually close to the mesh’s centroid, and appears to be the center of a sphere used for certain kinds of collision testing.+''%%Centre%%'' is usually close to the mesh’s centroid, and is the center of a sphere used for certain kinds of collision testing.
  
-''%%CollRadius%%'' appears to be the radius of that aforementioned collisional sphere.+''%%CollRadius%%'' is the radius of that aforementioned collisional sphere.
  
 ''%%NumNormals%%'': If positive, it is a number of normals in this mesh. If negative, it is a number of vertex lighting elements (''%%abs%%'' value). ''%%NumNormals%%'': If positive, it is a number of normals in this mesh. If negative, it is a number of vertex lighting elements (''%%abs%%'' value).
Line 119: Line 120:
 ''%%VisibilityBox%%'' and ''%%CollisionBox%%'' boundaries is always stay axis aligned even after applying tr_room_staticmesh::Rotation (always have 90 degrees step). Additionally, the test whether to rotate the box or not relies on the mesh’s rotation being an exact multiple of 0x4000 (aka 90 degrees). If this is not the case, the box is not rotated, which results in wrong collision checks. ''%%VisibilityBox%%'' and ''%%CollisionBox%%'' boundaries is always stay axis aligned even after applying tr_room_staticmesh::Rotation (always have 90 degrees step). Additionally, the test whether to rotate the box or not relies on the mesh’s rotation being an exact multiple of 0x4000 (aka 90 degrees). If this is not the case, the box is not rotated, which results in wrong collision checks.
  
-{{:icons:tr1.png?nolink|TR1 only}}{{:icons:tr2.png?nolink|TR2 only}} ''%%Flags%%'':+{{:icons:tr1.png?nolink|TR1 only}}{{:icons:tr2.png?nolink|TR2 only}}{{:icons:tr3.png?nolink|TR3 only}} ''%%Flags%%'':
   * **Bit 0** (''0x0001''): no collision   * **Bit 0** (''0x0001''): no collision
   * **Bit 1** (''0x0002''): is visible   * **Bit 1** (''0x0002''): is visible
trs/meshes_models.1590350018.txt.gz · Last modified: 2020/05/24 19:53 by zdimension
Back to top
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0