Flick A Ball
Fal01
Member Posts: 460
Hi all,
I want to be able to flick a static actor(ball) in the direction of the swipe like taking a penalty in football (soccer).
Thanks for any help
It’s not a bug – it’s an undocumented feature
Comments
The question is a little ambiguous. Footballs are not swiped, they are kicked.
Do you want to kick it? (Detect collision at the edge of the ball.)
Or do you want to swipe it? (Click and hold the mouse over the actor. Then measure mouse speed. Then transfer mouse speed to the ball.)
If the second option, do you want to move the ball (along with the mouse) until the mouse is released. Or do you want the ball to remain stationary until the mouse is released? Or do you want the ball to remain stationary until the mouse moves off the edge of the ball.
The more detail you give, the more precise the answer can be!
-RT
You've obviously never seen the England team in a penalty shootout.
you mean something like this?
✮ FREE templates at GSinvention ✮
✮ Available for hire! support@gsinvention.com ✮
I think it would be more representative of a football kick to swipe towards the ball - and at the point where your finger / mouse hits the ball, the speed of the swipe (along with the angle you hit the ball at) would be used to propel the ball forward. A sort of hybrid of both your ideas.
But, yes, the more detail he gives, the better the answer, otherwise there's a lot of guessing.
@Socks -- You had me worried! I'm not a soccer person (midwest American) so I had to look up Wikipedia to see the rules for 'penalty shoot out'. That was a mess, so I watched a video. (Portugal vs England 2006) Sure enough, England goalies swiped at the ball. But all shooters kick!
The method you propose is more like option A that I mentioned. (But maybe that was ambiguous as well.)
@timolapre1998 -- yes that's a variant of option 2B. Good idea!
Lol, yes, basically we (England) are notoriously bad at penalty shootouts.
@RThurman, @Socks.
Yes as @Socks said much more concisely than me-
"I think it would be more representative of a football kick to swipe towards the ball - and at the point where your finger / mouse hits the ball, the speed of the swipe (along with the angle you hit the ball at) would be used to propel the ball forward."
This is what i'm after.
@timolapre1998,
Thanks for the demo, but it's not quite what i'm looking for.
It’s not a bug – it’s an undocumented feature
This might work. It calculates mouse speed and then transfers that speed to the ball velocity.
Thanks a lot for going out of your way to make a demo @RThurman,
I think that will do the trick!
It’s not a bug – it’s an undocumented feature
Brilliant stuff !
Glad it's gonna work for you! (Demos are easy -- typing an explanation isn't.)
-RT
GameSalad makes us all look like genuses, er... geneses, um... genus's, ahh.. smart people!
Geniuses.
.