connect actors

Tom24Tom24 Member, PRO Posts: 22

Hello Guys,

me again :-)

I try now for some time to connect actors.

I have 6 different actors on a grid, and you can connect these.

this works actually quite good, but I want to show the connection as a kind of line.

and there is my problem! but how?

i tried (spaw actor and interpolate/ magnitude.. this actor to mouse position) but this works not exactly what i want!

There is certainly a formula how it works, but I just do not find out how.

I made a little picture to show what i mean (that's not my game/only a 5 min photoshop graphic)

has someone already made something like this? or know how i can make this?

Thank's for your help

Comments

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

    For two dots (dot1 and dot2)

    Spawn a new actor for the link:

    Change Rotation to VectorToAngle (dot1 x - dot2 x, dot1 y - dot2 y)
    Change Width to Magnitude (dot1 x - dot2 x, dot1 y - dot2 y)
    Change x to (dot1 x + dot2 x)/2
    Change y to (dot1 y + dot2 xy)/2

  • Tom24Tom24 Member, PRO Posts: 22

    Thanks for your answer

    But i have 64 Actors with 6 different typs in this grid.

    how can i get the position (XY) of the actor i want to connect?

  • Tom24Tom24 Member, PRO Posts: 22

    Ok i think i got it!! GREAT

    @Socks Thanks for your help!
    this was exactly I was looking for :-)

  • -Timo--Timo- Member Posts: 2,313

    We have a pattern lock template which does the same. Maybe it can help. http://www.gsinvention.com/product/pattern-lock/

  • Tom24Tom24 Member, PRO Posts: 22
Sign In or Register to comment.