View Full Version : [AS2] player movement help
hmvince
07-13-2009, 03:39 AM
I have made a game where a computer has to fetch a moving ball. I was wondering what the best way to do this would be. Just making the player go straight towards the ball each frame does not work.
I was thinking that the player could move towards the ball perpendicularly to its path. That would be ideal but really hard.
Thanks for all your time and help.
TastyTeo
07-13-2009, 12:50 PM
i didn't understand anything from your question.... you might be a beginner, if you want to learn how to move a player and how to make it pickup something you should try this tutorial page/blog www.gorillagames.co.uk It helps a lot all people, and remember to put the stop code in the frames..
stop(); //put this code on the frames
hmvince
07-14-2009, 12:37 AM
hmm after rereading it it does seem a bit...
so.
I want the player to move towards the path of the ball so the two paths form a 90 degree angle. with the example below if the ball was moving straight across, instead of the player moving towards the ball it would move straight up (perpendicurarly).
(BALL)
.................................................. ......(PLAYER)
thanks again.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.