Relative position

Hi! I have a little question about relative positions.
In "CreationTemplate.ini" I read about that:
Position = [Vector]; NB: If objects has a valid parent and use its space, this value will be considered in parent's space, ie. [0-1] defines parent size on each axis;
But I have problems with this, "SceneObj" just shifting from left top corner of object "Scene_Game" on 0.5 pixels, not on half of parent object. What I did wrong?
ChildList = SceneObj
Graphic = Scene_Game_BG
Position = (0.0,0.0,0.0)

Texture = data/textures/fieldBG.png
Pivot = left | top

UseParentSpace = true
Scale = (0.5,0.5,1)
Graphic = Scene_Game_BG
Position = (0.5,0.5,-0.5)


  • edited August 2013
    Hi pacmancoder,

    Yeah, that statement is a bit confusing and I need to change it. It only works when a parent is directly defined inside an object's section (with ParentCamera, actually), not when an object has been created as a Child of another one.

    It means the UseParentSpace in your case doesn't have any influence and all the values are interpreted as being in orx's default unit (pixels).

    I can look into supporting UseParentSpace for objects that have been created via the ChildList of another one though never expressed that need before today. Anyway if you think it's something you'll really need, just let me know.

    As for the Pivot, no need to add the '|' character:
    Pivot = top left
    will work just fine. :)

    Lastly, if you use the latest version from the mercurial repository (and not the only from a binary package), there's a new module for resource management that will help you finding all the textures, sounds, config files without having to write their whole path down (and also making it pretty easy to support different platform with different resources).

    There's an example here: (that example shows also how to add custom container for resources, in that case ZIP archives, how to use timelines for interaction and a few other neat things).

    Don't hesitate if you have any other questions! :)
  • edited September 2013
    Oh, thnks! Anyway, I always can set all positions manualy, according to my tasks, using Graphics sizes,scales and other. And also, I'll look into new resources module, sounds sweet :3
Sign In or Register to comment.