Make balls launch towards moving target

So, my GS skills are rusty...alright...more than rusty. Please see video link below for a video description of my issue.

I really need help getting a ball to launch from a point, towards a target. This simple task...has defeated me. I have the moving target updating its position using the "constrain attribute" behavior stored in two int varaibles (TargetX and TargetY). I have another actor at the top of the screen that is spawning a ball every 0.5 seconds. On the ball, I have a behavior telling it to launch towards the target actor using the global position variable as a target. It...just doesn't seem to work right. When in certain positions it seems to be working correctly and when in others it seems to be completely wrong. Not sure what I'm doing wrong.

Video description of the issue:

Any assistance you could offer would be amazing. Thank you in advance.

Comments

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    This is a shot in the dark, but it looks like the change velocity behavior in the peg guide actor is missing the vectorToAngle function.

  • daniel.robert.campbelldaniel.robert.campbell Member Posts: 251
    edited August 2016

    Was a damn good shot in the dark my friend. That did the trick. thank you so much.

    I guess I need to relearn the basics. The only problem is that GS has undergone so many changes over the years that I'm not sure what guides are still relevant. Anyhoo, I've got some relearning to do. Thanks again for your help. Assuming this game ever sees the light of day, you'll get a special thanks in the credits. ;-)

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    Glad you got it sorted out. :)

    Best wishes on relearning GameSalad!

Sign In or Register to comment.