User Tools

Site Tools


en:tutorials:objects:literals_for_objects

Differences

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

Link to this comparison view

Next revision
Previous revision
en:tutorials:objects:literals_for_objects [2021/08/09 05:25 (4 years ago)] – created sausageen:tutorials:objects:literals_for_objects [2021/08/18 22:27 (4 years ago)] (current) – Fixed last example iarwain
Line 1: Line 1:
 ====== Position literals to align with Parent Objects ====== ====== Position literals to align with Parent Objects ======
  
-Literal Positions add flexibility to the Position property for objects (and incidentally for spawners as wellbut in a less extensive manner as spawners don't have a Pivot).+Using literals for object positioning adds flexibility for placing an object relative to its parentwithout having to do manual calculations.
  
-They should be useful for positioning an object relative to its parent, without doing some calculations manually.+This is especially useful in the context of UI.
  
-When a Parent is defined for an object, you can use the same literals for Position as with Pivot to align object inside parent's borders.+Furthermore, when a Parent is defined for an object, you can use the same literals for Position as with Pivot to align object inside parent's borders.
  
 The global form is: The global form is:
     Position = [pivot's override ->] Position's in parent space     Position = [pivot's override ->] Position's in parent space
- 
  
 Here's a basic setup with one rectangular parent (green) and one rectangular child (red): Here's a basic setup with one rectangular parent (green) and one rectangular child (red):
Line 128: Line 127:
 Scale           = 2 Scale           = 2
 Rotation        = 30 Rotation        = 30
-Position        = bottom right -> bottom +Position        = bottom right -> bottom left (0.25, 0, 0.1)
 </code> </code>
  
 {{ :tutorials:objects:literals09.png?direct&600 |}} {{ :tutorials:objects:literals09.png?direct&600 |}}
en/tutorials/objects/literals_for_objects.1628511912.txt.gz · Last modified: 2021/08/09 05:25 (4 years ago) by sausage