Constant velocity

DizkoDizko Member Posts: 498
edited November -1 in Working with GS (Mac)
Hello again!

I've been trying to figure out a way to apply constant velocity, I'm sure there some magic math equation or something that could do it, but the solution is eluding me.

Right now I have an actor that when it collides with actor2, actor2 gets a linear velocity of 100.

I want that velocity to remain constant while the 2 are colliding, the problem I'm getting is that if actor2 hits a wall, you have to move actor1 away and then re-collide with actor2 to get it moving again.

I thought that instead of simply setting the velocity to 100, that I would multiply the current velocity by 100 and then cap it at a max of 100, that way it's always multiplying so if actor2 slows down from hitting a wall or another object, it would keep the pressure on so to speak.

Problem is, I've only been working with GS for a few days, and haven't the slightest idea how I would set that up.

Any thoughts from the gurus?

Comments

  • DizkoDizko Member Posts: 498
    No help for the diz man?
  • DrGlickertDrGlickert Member Posts: 1,135
    I've had this question for a while now. I'm curious to what the forum thinks.
  • AsymptoteellAsymptoteell Member Posts: 1,362
    Constrain the attribute, don't just change it. Constrain attribute will pet the attribute remain at a certain value for as long as you want.

    Asymptoteell
  • DrGlickertDrGlickert Member Posts: 1,135
    Nice. Didn't think of that. Makes sense now. Sounds like a simple fix too.
  • DizkoDizko Member Posts: 498
    That makes a whole lot of sense actually. Thanks!
  • DrGlickertDrGlickert Member Posts: 1,135
    Hmm, wait. Which attribute would you put the Constrain Attribute to? There is no "Speed" attribute... Unless I missed something somewhere...
Sign In or Register to comment.