SaRs
06-28-2008, 10:42 AM
Hi everyone,
I've been working on a small game to keep my sanity inbetween my more corporate projects.
Basically, one of the enemies is going to emerge from a tar pit and throw a ball of tar towards your character once you're in range.
I can make an object move to my character with ease, however - I'd like it to follow a curved throwing motion, preferably with a random margin of error (not just using my char's x & y). Then, when it reaches the height of it's arc, it would be colliding, or coming within it's calculated error margin of my character. After that it would proceed to fall using the same arc.
If it's possible, I'd like to have some sort of acceleration or easing on it as well...
I know that's a bit of an ask, but I've been googling and working on it for hours and have gotten nowhere. I can't seem to make sense of some of the more tricky coding examples of ways to dynamically draw curved arc's etc.
Any help would be appreciated.
I've been working on a small game to keep my sanity inbetween my more corporate projects.
Basically, one of the enemies is going to emerge from a tar pit and throw a ball of tar towards your character once you're in range.
I can make an object move to my character with ease, however - I'd like it to follow a curved throwing motion, preferably with a random margin of error (not just using my char's x & y). Then, when it reaches the height of it's arc, it would be colliding, or coming within it's calculated error margin of my character. After that it would proceed to fall using the same arc.
If it's possible, I'd like to have some sort of acceleration or easing on it as well...
I know that's a bit of an ask, but I've been googling and working on it for hours and have gotten nowhere. I can't seem to make sense of some of the more tricky coding examples of ways to dynamically draw curved arc's etc.
Any help would be appreciated.