Move Object to Actionpart not Absolute

  • #1, by atrusSunday, 25. June 2017, 19:47 3 years ago
    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

    Forum Fan

    237 Posts


  • #2, by sebastianSunday, 25. June 2017, 19:52 3 years ago
    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^^


    Thread Captain

    2337 Posts

  • #3, by atrusSunday, 25. June 2017, 22:58 3 years ago
    Yes, basically 'move object to' should be absolute, but it's relative instead, so it looks like a bug indeed.

    Forum Fan

    237 Posts

  • #4, by SimonSWednesday, 28. June 2017, 21:22 3 years ago
    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.

    Thread Captain

    1368 Posts

  • #5, by atrusThursday, 29. June 2017, 10:31 3 years ago
    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.


    Forum Fan

    237 Posts

  • #6, by SimonSThursday, 29. June 2017, 10:44 3 years ago
    Please set the position of the image and then try again.

    Thread Captain

    1368 Posts

  • #7, by atrusThursday, 29. June 2017, 11:44 3 years ago
    Now that's clear, thanks so much! Keep up the great work.

    Forum Fan

    237 Posts

  • #8, by atrusThursday, 29. June 2017, 13:12 3 years ago
    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

    Forum Fan

    237 Posts

  • #9, by ke4Thursday, 29. June 2017, 13:38 3 years ago
    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


    Key Killer

    810 Posts

  • #10, by atrusThursday, 29. June 2017, 16:10 3 years ago
    Yeap, that's a good way to solve this , thanks!

    Forum Fan

    237 Posts

  • #11, by MachtnixThursday, 29. June 2017, 16:39 3 years ago
    Why don't set the character directly on the wanted position??

    Thread Captain

    1087 Posts

Write post