Lock actors together.

efishefish Member Posts: 40
edited November -1 in Working with GS (Mac)
Hey guys!
Does anyone know if it is possible to lock one actor to another? Lets say you have on invisible actor that moves exactly like another visible actor when it is touched. I currently use the "follow" method where I track the others actors position (x) vi an attribute, but this method does have a small lag. Any help is appreciated!
Thanks:)

Comments

  • KamazarKamazar Member Posts: 287
    This always gives me a slight migraine when I think about it (since I've been trying to figure this puppy out too), but I've got a theory. It's relatively simply, just get's convoluted with the math. Ok, here goes...

    Create two variable that track the X and Y of the actor you're locking onto (locking actor).

    When "invisible actor" collides or overlaps with "locking actor", constrain "invisible actors" X and Y coordinates to "locking actor's X" + ("locking actor's" X - "invisible actor's" X) and "locking actor's" Y + ("locking actor's" Y - "invisible actor's" Y).

    Basically, I'm taking the difference in location between the two actors, and using them as offsets when constraining the invisible actor's location to the locking actor's location. Kinda, maybe make sense?
  • millerbrother1millerbrother1 Member Posts: 108
    Did that work Kamazar? I'm curious if locking to invisible actors is more work than it was worth. Did it solve your issues?
  • ORBZORBZ Member Posts: 1,304
    scene level actors (not prototypes) can directly access the properties of each other.
  • millerbrother1millerbrother1 Member Posts: 108
    Good tip ORBZ. I was wondering why I couldn't base my actor's attributes on another actor's.
  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    ORBZ said:
    scene level actors (not prototypes) can directly access the properties of each other.

    I thought you could only access attribute of these scene not other actors in the scene.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    double click on an actor that you have dragged to a scene (click on it IN the scene). then click on the scary lock to unlock it.

    Now create a rule and you will see "current scene" as an option in the drop down of the rule. Select layers and listed in each layer is every other actor on the scene.
Sign In or Register to comment.