Need some object interaction help

UberAirshipUberAirship Member Posts: 10
edited August 2012 in Working with GS (Mac)
To make a long story short I have a little game that involves atoms. Not in a real world sense, but in theory for how they move and interact. What I am trying to do is get them to collide with each other on bond together. That part I got to work by setting up constrains when they collide. However the problem I have is when they collide they stop. I need them to keep moving and have their direction effected by the atoms running into each other. Think astroids smacking into each other and how they change direction but in this case they connect to each other.

Comments

  • UberAirshipUberAirship Member Posts: 10
    bump
  • UberAirshipUberAirship Member Posts: 10
    Not sure I am following you.. You're talking about linear velocity x of the object? Using a change attribute behavior?
  • UberAirshipUberAirship Member Posts: 10
    Ok that's what I am doing. My rules are setup like this.

    when any conditions are valid:
    Actor receives event: overlaps or collides with actor with tag Atoms
    Change Attribute self.motion.linear velocity X to 0
    Change attribute self.motion.linear velocity Y to 0
    Change attribute self.BondX to self.Position.X
    Change Attribute self.BondY to self.Position.Y
    Constrain Attribute self.Position.X to self.BondX
    Constrain self.position.Y to self.BondY
    Change Velocity
    Direction: 0
    Speed: self.Motion.Linear Velocity X
Sign In or Register to comment.