Transform increasing the size of the object when I change the scale?

Discussion in 'Buildbox General Discussion' started by harshann, Mar 10, 2016.

  1. harshann

    harshann Boxer

    Joined:
    Mar 2, 2016
    Messages:
    36
    Likes Received:
    7
    Hi,

    I'm trying to use transform to achieve to and fro movement for a particular object.

    When the object hits the transform, I'm changing the scale and linear velocity.

    My object grows in size instead if flipping. Can any one help?
     
  2. JustWatchApps

    JustWatchApps Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    315
    Likes Received:
    145
    @harshann I believe you should try setting the scale the same, but just add a negative sign (-)

    (assuming BB1)

    How to get an object moving from right to left and back using Logic: Transform

    1. Set your object to fixed. Have this positioned to the right of the screen as the starting point for movement.
    2. Set Linear Velocity to -10.000,0 (this will start the object moving to the left).
    3. Drag a Logic: Transform item onto game positioned to the left of your object where you wish the object to move to.
    4. Set Scale Modifier the same as your object but preceded by minus aka: -0.400 if your object scale is 0.400 (this “flips” the object to point to the right).
    5. Set Linear Velocity Modifier to 10.000 (this is now a positive number to move the object to the left).
    6. Set Affected asset to the object you wish to move from the list.
    7. Set Affect operation to ‘Replace’
    8. Now duplicate the logic (press d).
    9. Move the Logic: Transform item to the right of the object (ensure IT IS NOT TOUCHING THE OBJECT otherwise this logic item will immediately affect the object when game play starts)
    10. Set Scale Modifier to 0.400 (this “flips” the object to point to the left).
    11. Set Linear Velocity Modifier to to -10.000 (this is now a negative number again to move the object to the left).
     
    Last edited: Mar 10, 2016
    harshann likes this.
  3. harshann

    harshann Boxer

    Joined:
    Mar 2, 2016
    Messages:
    36
    Likes Received:
    7
    Thanks a million @JustWatchApps. That worked like a miracle. Thank you for the detailed explanation.
     
    JustWatchApps likes this.
  4. JustWatchApps

    JustWatchApps Avid Boxer

    Joined:
    Sep 25, 2015
    Messages:
    315
    Likes Received:
    145
    Happy to help @harshann
     

Share This Page