Hello,
I was wondering if there is any way to make lighting look more consistent on repeated objects. On this picture
you can clearly see where each wall tile begins and ends. Is there any way around it? (ignore the tiles, I fixed that).Additionally, the walls and windows dont collide with the player in my program, but the floors do, and Im not sure why. Both have correctly placed collision maps, and the floors and walls use the same collision mask (Layer one, mask three, player component is default). I am completely stumped. One thing that may be important is that I have a physics raycaster that reads the node’s names and displays them. The window tiles names get displayed, but the walls and floor do not. Here are the object XML files. This also happens when I load wall tiles from the object directly, so I am not sure that it is a level loading issue.
Wall:
<?xml version="1.0"?>
<node id="3">
<attribute name="Name" value="Wall" />
<attribute name="Position" value="0 0 0" />
<attribute name="Rotation" value="1 0 0 0" />
<attribute name="Scale" value="1 1 1" />
<attribute name="Variables" />
<component type="StaticModel" id="7">
<attribute name="Model" value="Model;Models/Wall.mdl" />
<attribute name="Material" value="Material;Materials/Wall.xml" />
<attribute name="Is Occluder" value="true" />
<attribute name="Can Be Occluded" value="true" />
<attribute name="Cast Shadows" value="true" />
<attribute name="Draw Distance" value="0" />
<attribute name="Shadow Distance" value="0" />
<attribute name="LOD Bias" value="1" />
<attribute name="Max Lights" value="0" />
<attribute name="View Mask" value="-1" />
<attribute name="Light Mask" value="-1" />
<attribute name="Shadow Mask" value="-1" />
<attribute name="Zone Mask" value="-1" />
</component>
<component type="CollisionShape" id="8">
<attribute name="Shape Type" value="Box" />
<attribute name="Size" value="2 3 0.4" />
<attribute name="Offset Position" value="0 1.5 0" />
<attribute name="Offset Rotation" value="1 0 0 0" />
<attribute name="Collision Margin" value="0.01" />
<attribute name="Model" value="Model;" />
<attribute name="LOD Level" value="0" />
</component>
<component type="RigidBody" id="9">
<attribute name="Physics Position" value="0 0 0" />
<attribute name="Physics Rotation" value="1 0 0 0" />
<attribute name="Mass" value="0" />
<attribute name="Friction" value="100" />
<attribute name="Restitution" value="0" />
<attribute name="Linear Velocity" value="0 0 0" />
<attribute name="Angular Velocity" value="0 0 0" />
<attribute name="Linear Factor" value="1 1 1" />
<attribute name="Angular Factor" value="1 1 1" />
<attribute name="Linear Damping" value="0" />
<attribute name="Angular Damping" value="0" />
<attribute name="Linear Rest Threshold" value="0.01" />
<attribute name="Angular Rest Threshold" value="1" />
<attribute name="Collision Layer" value="1" />
<attribute name="Collision Mask" value="3" />
<attribute name="Collision Event Mode" value="When Active" />
<attribute name="Use Gravity" value="False" />
<attribute name="Is Kinematic" value="false" />
<attribute name="Is Trigger" value="false" />
</component>
</node>
Window:
<?xml version="1.0"?>
<node id="3">
<attribute name="Name" value="WindowFrame" />
<attribute name="Position" value="0 0 0" />
<attribute name="Rotation" value="1 0 0 0" />
<attribute name="Scale" value="1 1 1" />
<attribute name="Variables" />
<component type="StaticModel" id="7">
<attribute name="Model" value="Model;Models/WindowFrame.mdl" />
<attribute name="Material" value="Material;Materials/WindowFrame.xml" />
<attribute name="Is Occluder" value="false" />
<attribute name="Can Be Occluded" value="true" />
<attribute name="Cast Shadows" value="true" />
<attribute name="Draw Distance" value="0" />
<attribute name="Shadow Distance" value="0" />
<attribute name="LOD Bias" value="1" />
<attribute name="Max Lights" value="0" />
<attribute name="View Mask" value="-1" />
<attribute name="Light Mask" value="-1" />
<attribute name="Shadow Mask" value="-1" />
<attribute name="Zone Mask" value="-1" />
</component>
<component type="CollisionShape" id="8">
<attribute name="Shape Type" value="Box" />
<attribute name="Size" value="2 3 0.4" />
<attribute name="Offset Position" value="0 1.5 0" />
<attribute name="Offset Rotation" value="1 0 0 0" />
<attribute name="Collision Margin" value="0.01" />
<attribute name="Model" value="Model;" />
<attribute name="LOD Level" value="0" />
</component>
<component type="RigidBody" id="9">
<attribute name="Physics Position" value="0 0 0" />
<attribute name="Physics Rotation" value="1 0 0 0" />
<attribute name="Mass" value="0" />
<attribute name="Friction" value="0.5" />
<attribute name="Restitution" value="0" />
<attribute name="Linear Velocity" value="0 0 0" />
<attribute name="Angular Velocity" value="0 0 0" />
<attribute name="Linear Factor" value="1 1 1" />
<attribute name="Angular Factor" value="1 1 1" />
<attribute name="Linear Damping" value="0" />
<attribute name="Angular Damping" value="0" />
<attribute name="Linear Rest Threshold" value="0.01" />
<attribute name="Angular Rest Threshold" value="1" />
<attribute name="Collision Layer" value="2" />
<attribute name="Collision Mask" value="3" />
<attribute name="Collision Event Mode" value="When Active" />
<attribute name="Use Gravity" value="false" />
<attribute name="Is Kinematic" value="false" />
<attribute name="Is Trigger" value="false" />
</component>
<node id="4">
<attribute name="Name" value="WindowPane" />
<attribute name="Position" value="0 0 0" />
<attribute name="Rotation" value="1 0 0 0" />
<attribute name="Scale" value="1 1 1" />
<attribute name="Variables" />
<component type="StaticModel" id="7">
<attribute name="Model" value="Model;Models/WindowPane.mdl" />
<attribute name="Material" value="Material;Materials/WindowPane.xml" />
<attribute name="Is Occluder" value="false" />
<attribute name="Can Be Occluded" value="true" />
<attribute name="Cast Shadows" value="true" />
<attribute name="Draw Distance" value="0" />
<attribute name="Shadow Distance" value="0" />
<attribute name="LOD Bias" value="1" />
<attribute name="Max Lights" value="0" />
<attribute name="View Mask" value="-1" />
<attribute name="Light Mask" value="-1" />
<attribute name="Shadow Mask" value="-1" />
<attribute name="Zone Mask" value="-1" />
</component>
<!-- <component type="CollisionShape" id="8">
<attribute name="Shape Type" value="Box" />
<attribute name="Size" value="2 3 0.2" />
<attribute name="Offset Position" value="0 1.5 0" />
<attribute name="Offset Rotation" value="1 0 0 0" />
<attribute name="Collision Margin" value="0.01" />
<attribute name="Model" value="Model;" />
<attribute name="LOD Level" value="0" />
</component>
<component type="RigidBody" id="9">
<attribute name="Physics Position" value="0 0 0" />
<attribute name="Physics Rotation" value="1 0 0 0" />
<attribute name="Mass" value="0.5" />
<attribute name="Friction" value="0.5" />
<attribute name="Restitution" value="0" />
<attribute name="Linear Velocity" value="0 0 0" />
<attribute name="Angular Velocity" value="0 0 0" />
<attribute name="Linear Factor" value="1 1 1" />
<attribute name="Angular Factor" value="1 1 1" />
<attribute name="Linear Damping" value="0" />
<attribute name="Angular Damping" value="0" />
<attribute name="Linear Rest Threshold" value="0.01" />
<attribute name="Angular Rest Threshold" value="1" />
<attribute name="Collision Layer" value="2" />
<attribute name="Collision Mask" value="3" />
<attribute name="Collision Event Mode" value="When Active" />
<attribute name="Use Gravity" value="true" />
<attribute name="Is Kinematic" value="false" />
<attribute name="Is Trigger" value="false" />
</component> -->
</node>
</node>
Floor:
<?xml version="1.0"?>
<node id="3">
<attribute name="Name" value="Floor" />
<attribute name="Position" value="0 0 0" />
<attribute name="Rotation" value="1 0 0 0" />
<attribute name="Scale" value="1 1 1" />
<attribute name="Variables" />
<component type="StaticModel" id="7">
<attribute name="Model" value="Model;Models/Floor.mdl" />
<attribute name="Material" value="Material;Materials/Floor.xml" />
<attribute name="Is Occluder" value="true" />
<attribute name="Can Be Occluded" value="true" />
<attribute name="Cast Shadows" value="true" />
<attribute name="Draw Distance" value="0" />
<attribute name="Shadow Distance" value="0" />
<attribute name="LOD Bias" value="1" />
<attribute name="Max Lights" value="0" />
<attribute name="View Mask" value="-1" />
<attribute name="Light Mask" value="-1" />
<attribute name="Shadow Mask" value="-1" />
<attribute name="Zone Mask" value="-1" />
</component>
<component type="CollisionShape" id="8">
<attribute name="Shape Type" value="Box" />
<attribute name="Size" value="2 0.2 2" />
<attribute name="Offset Position" value="0 -0.1 0" />
<attribute name="Offset Rotation" value="1 0 0 0" />
<attribute name="Collision Margin" value="0.01" />
<attribute name="Model" value="Model;" />
<attribute name="LOD Level" value="0" />
</component>
<component type="RigidBody" id="9">
<attribute name="Physics Position" value="0 0 0" />
<attribute name="Physics Rotation" value="1 0 0 0" />
<attribute name="Mass" value="0" />
<attribute name="Friction" value="100" />
<attribute name="Restitution" value="0" />
<attribute name="Linear Velocity" value="0 0 0" />
<attribute name="Angular Velocity" value="0 0 0" />
<attribute name="Linear Factor" value="1 1 1" />
<attribute name="Angular Factor" value="1 1 1" />
<attribute name="Linear Damping" value="0" />
<attribute name="Angular Damping" value="0" />
<attribute name="Linear Rest Threshold" value="0.01" />
<attribute name="Angular Rest Threshold" value="1" />
<attribute name="Collision Layer" value="1" />
<attribute name="Collision Mask" value="3" />
<attribute name="Collision Event Mode" value="When Active" />
<attribute name="Use Gravity" value="False" />
<attribute name="Is Kinematic" value="false" />
<attribute name="Is Trigger" value="false" />
</component>
</node>