-
Notifications
You must be signed in to change notification settings - Fork 11
Tiles not positioned, rotated or scaled as expected
Tiles do not appear to be positioned, rotated or scaled correctly when painted because an offset has been specified or its origin (pivot point) is incorrect.
Painted tiles are not aligned properly against tile system.
Possible causes for this problem:
-
An incorrect transform offset has been specified for brush.
-
Apply Prefab Transform is selected for brush but transform of tile prefab is incorrect.
-
Origin of tile prefab is incorrect.
Prefab transform is used to offset tile when Apply Prefab Transform is selected for brush. The position value of a prefab is often non-zero upon creation which may need to be manually set to (0, 0, 0).
-
Find and select prefab asset using Project panel.
-
Check position using Inspector.
-
See Fix offset of prefab if position is something other than (0, 0, 0).
-
Create a blank scene
-
Add instance of troublesome prefab to scene.
-
Ensure that position of prefab instance is set to (0, 0, 0) using Inspector.
-
See Fix pivot point of prefab if object does not appear at center of scene.
-
Find and select prefab asset using Project window.
-
Set position of prefab to (0, 0, 0) using Inspector for central placement within tile cell.
-
Attempt to paint using brush to see if this resolves the problem.
Correct pivot point of game object by repositioning nested objects and/or altering mesh if required. Another easier way to fine-tune tile object placement is to apply a prefab offset as described in the next section.
-
Create blank scene and add a tile system.
-
Paint instance of the troublesome tile.
-
Select root most object of tile which is connected to tile prefab.
-
Correct position/rotation/scale of tile using the regular Unity tools or inspector.
-
Select | Use as Prefab Offset.
-
Attempt to paint using brush to see if this resolves the problem.
-
Offset, Rotate and Scale Prefabs
Sometimes you may find that your tiles are do not align in the way that you had expected. The way in which prefab instances are positioned can be influenced using the transform properties of tile prefabs themselves.
Source: topics/Tiles-not-positioned,-rotated-or-scaled-as-expected.md
Copyright © Rotorz Limited. All rights reserved.