increase velocity of an actor moving in any direction.

GamersRejoiceGamersRejoice Member Posts: 817
edited November -1 in Working with GS (Mac)
So I have a ball that bounces around using velocity initially to send it off. When the ball overlaps with a certain actor I want the ball to increase its velocity or speed and keep moving in the same direction it was already moving. Any help?

Comments

  • GamersRejoiceGamersRejoice Member Posts: 817
    Hi tshirt,

    I can't seem to find self.ang.vol.X or Y? I see self.motion.angular velocity
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    That's what he meant.
  • GamersRejoiceGamersRejoice Member Posts: 817
    oh well... that makes me feel stupid. I select that but then there is no option to select either X or Y
  • HunnenkoenigHunnenkoenig Member Posts: 1,173
    When I made my wallbreaker game, the ball had a speed up bonus.

    Then I had a self attribute "current aov", which I constrained to
    VectorToAngle(self.Motion.Linear Velocity.X,self.Motion.Linear Velocity.Y)

    Then, when the speedup bonus applied, I changed the max speed to 500 and added the rule

    Change Velocity
    Direction: self.current aov
    speed: 500

    I think there is something about it in the wiki or I took it from a template.

    I am sure, I didn't invent it myself :-P
  • GamersRejoiceGamersRejoice Member Posts: 817
    Well I tried this:

    change velocity
    direction: self.motion.angular velocity
    speed: 600

    and the speed increase just like I want however it's not continuing in the same direction, it only moves horizontally at that point.
  • GamersRejoiceGamersRejoice Member Posts: 817
    I think I'm close guys just a little more help please.

    Tshirt, I've tried what you say but I can't select the angular velocity and an X or Y value to go along with it.
  • GamersRejoiceGamersRejoice Member Posts: 817
    After a ton of fiddling, this is what I had to do,

    if actor overlaps or collides with (name of actor)

    Change Velocity
    Direction: vectorToAngle ( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y )
    Speed:500 (higher than what it was before.)

    So thanks for the help guys I appreciate it. Hopefully someone finds this thread useful.
  • RHRH Member Posts: 1,079
    GamersRejoice said:
    After a ton of fiddling, this is what I had to do,

    if actor overlaps or collides with (name of actor)

    Change Velocity
    Direction: vectorToAngle ( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y )
    Speed:500 (higher than what it was before.)

    I love how this is exactly what Hunnenkoenig said.
  • GamersRejoiceGamersRejoice Member Posts: 817
    haha, you're right! Ok well it's a tiny bit different. Dang it! I'm having a bad day.
  • RHRH Member Posts: 1,079
    GamersRejoice said:
    haha, you're right! Ok well it's a tiny bit different. Dang it! I'm having a bad day.

    Heh, I do it all the time!
  • tylergarrisontylergarrison Member Posts: 1
    After a ton of fiddling, this is what I had to do,

    if actor overlaps or collides with (name of actor)

    Change Velocity
    Direction: vectorToAngle ( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y )
    Speed:500 (higher than what it was before.)

    So thanks for the help guys I appreciate it. Hopefully someone finds this thread useful.
    Hi ladies and gents--

    I'm reviving this old thread only because I figured it can't hurt to post in a thread that contains the exact same thing I'm trying to accomplish. Sadly, mine isn't working as intended using the above settings. The actor (which is moving at a speed of 800, with a camera follow rule) collides with the object (in this case a Mario Kart type boost square) and the actor "jumps" forward abruptly (again, thanks to the values I've entered trying to simulate a speed up effect). Sadly, this jump only lasts for a split second and the actor does not actually continue to travel at a faster speed as intended.

    I'm starting to believe that working with a moving actor (instead of a static one on top of a scrolling background) makes things more complicated but unfortunately I'm locked in to this functionality for now for the sake of ease of prototyping and laying out levels/obstacles.

    Any thoughts as to why the actor's actual speed won't increase. Should I be using a max speed rule or something other than a change velocity since my actor is constantly moving? I'm a bit lost in this Gamesalad world but I'm trying my best to hang on to the logic of this stuff thanks to the wonderful and incredibly helpful community around here.

    Any help or thoughts would be much appreciated. Thanks!
Sign In or Register to comment.