Direction for Change Velocity help!

orien2v2orien2v2 Member, PRO Posts: 55
edited November -1 in Working with GS (Mac)
Hey guys, I've a moving actor(A) and I want newly spawned actors(B) to move towards A. I tried using accelerate, accelerate towards, move, move towards, interpolate....all doesn't work because I also have gravity and those don't seem to respond to gravity as actors B keeps following A around the screen and not falling back down.

The only one that works according to what I need is change velocity and unfortunately I'm no math genius but I think some trigonometry is involved in getting the direction for actor B to move towards A. If I'm not mistaken you can find the angle if there are two coordinate points with some math. I've constrained actor A's position to two new attributes by the way (A_x, A_y).

Hope this is not too complicated! Thanks a lot!

Comments

  • OkyshoOkysho Member Posts: 158
    This is just a tad difficult to understand what exactly it is you want. Do you have an example?

    If not, let me see if I get what you're asking. You want a spawned actor to move towards your main actor?
  • PhoticsPhotics Member Posts: 4,172
    orien2v2 said:
    Hey guys, I've a moving actor(A) and I want newly spawned actors(B) to move towards A. I tried using accelerate, accelerate towards, move, move towards, interpolate....all doesn't work because I also have gravity and those don't seem to respond to gravity as actors B keeps following A around the screen and not falling back down.

    Maybe don't use gravity. Instead, add an accelerate behavior on each of the actors, with a downward direction.
  • orien2v2orien2v2 Member, PRO Posts: 55
    Okysho said:
    This is just a tad difficult to understand what exactly it is you want. Do you have an example?

    If not, let me see if I get what you're asking. You want a spawned actor to move towards your main actor?

    ok hold on I'll try to do a web version to cut down the size it's almost 30mb now which would take some time and it's much more complicated...I'll reduce everything so you guys can see directly what I want.
    Photics said:
    Maybe don't use gravity. Instead, add an accelerate behavior on each of the actors, with a downward direction.

    well I'll try that but if that works it would really suck because I need to do that for 44 times!!! Kinda hoping 70% chance it wouldn't work so I can find an easier solution hahaha
Sign In or Register to comment.