Hi all! I am creating a racing game whereby there will be an AI player and a real player. The AI player will move in a constant speend throughout the entire game and rye real player needs to answer questions to overtake the AI player. When the real player answer one question correctly, an item such as a banana will be thrown at the AI player and the AI player will stop moving for a few seconds before moving again. However, I do not know how to show the throwing of item at where ever the AI player is. Should I create the real player sprite that is throwing an item or should I create just the real player sprite and item sprite separately?
helló. you should create player sprite with the throwing animation with empty hands without any item, and the banana (or anything else) as separate sprite objects. like others do.
Alright thanks a lot! Then how can throw the object at a moving sprite?
I mean how can I make sure that the object is thrown at a moving sprite and hit it and it will stop its movement.
Depends on how you’re moving objects in your game - are you moving the player, AI player and the camera? If so, is the AI player moving in a straight line or along a fixed path?
Or are you keeping the player, AI player and the camera stationary and moving the background/scenery?
Hi! The AI player and the real player are running beside each other along the running track