Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

Move Object to Actionpart not Absolute

  • #1, by dionous 9 years ago Zitieren
    Hello to all,

    Have a scene where i'm trying out Move Object To actionpart but the object always moves in relation to the object (offset) and not to the absolute position. Can u confirm this pls?

    Using 5RC1.

    Rgrds
  • #2, by sebastian 9 years ago Zitieren
    THere are two action parts which can move an object

    move object to -> absolute
    move object (by) -> relative

    The normal "to" should move to an absolute position as far as i know. If not I would consider this as a bug^^


  • #3, by dionous 9 years ago Zitieren
    Yes, basically 'move object to' should be absolute, but it's relative instead, so it looks like a bug indeed.
  • #4, by SimonS 9 years ago Zitieren
    The action part doesn't work as you might expect it, it uses ObjectPosition to calculate the absolute position, so set the ObjectPosition to the top left of the image if you want to use it on sprites.
  • #5, by dionous 9 years ago Zitieren
    Thanks Simon,

    It's a bit strange, and i still think there is some issue so i've PM'ed you a test ved if you could take a look.


  • #6, by SimonS 9 years ago Zitieren
    Please set the position of the image and then try again.
  • #7, by dionous 9 years ago Zitieren
    Now that's clear, thanks so much! Keep up the great work.
  • #8, by dionous 9 years ago Zitieren
    By the way, would it be possible to use this absolute movement with LUA?

    For now i can only remember ObjectOffset which is relevant movement.

    Thanks
  • #9, by ke4 9 years ago Zitieren
    You can calc the absolute position based on the object position.
    For example your object is at position x 500,y 500 and you want to move it to absolute position x 250, y 750 then:

    Offset x = (Object.name.Position.x - wanted position x)*-1
    offset y = (Object.name.Position.y - wanted positon y)*-1


  • #10, by dionous 9 years ago Zitieren
    Yeap, that's a good way to solve this , thanks!
  • #11, by Machtnix 9 years ago Zitieren
    Why don't set the character directly on the wanted position??