How to make an actor stick to another actor?

2»

Comments

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    @tatiang said:
    I'm not sure, to be honest. I'd have to work it out. Try sketching as I've done and see what values you come up with. Share those and -- assuming they don't work -- the community can suggest adjustments.

    Hi tatiang, I'm really stuck on this, can't seem to get it to work. Im really not sure what I'm supposed to do, I've tried subtracting the the widths, but its not working.
    What do you suggest?

    Thankyou.

    Thor.

  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2015

    @Thor said:
    I'm really stuck on this

    I've not really read through all the thread, but it looks like you need a square (made up from 4 separate sides) moving left and right ? If that's the case then I've attached a demo project of one way of doing it.

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    Hi Socks, thankyou :smile:
    Theres one problem, my project is in portrait, and when i try it, it goes to left of the screen perfectly but when it goes to the right it goes off the screen.

    So what would i have to change for it to work in portrait mode?

    Thankyou.

    Thor.

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    In your project you have in actor 1:

    collide with actor of type, but theres no actor in yours.

    In my project there isn't an option to put no actor it the "actor of type"

    Do you know what i should do?

    Thanks.

    Thor.

  • SocksSocks London, UK.Member Posts: 12,822

    @Thor said:
    Do you know what i should do?

    Ignore it.

  • SocksSocks London, UK.Member Posts: 12,822

    @Thor said:
    So what would i have to change for it to work in portrait mode?

    380 *sin( game.Time *100)+512

    380 = range of movement
    100 =speed
    512 = centre of movement

  • Mayhem_MadnessMayhem_Madness Member, PRO Posts: 168

    Thankyou very much Socks.

  • octreyuoctreyu Member, BASIC Posts: 3

    I needed that for my health bar

Sign In or Register to comment.