Flick A Ball

Fal01Fal01 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 :D

It’s not a bug – it’s an undocumented feature

Comments

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

    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

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2014

    @RThurman said:
    The question is a little ambiguous. Footballs are not swiped, they are kicked.

    You've obviously never seen the England team in a penalty shootout.

    :p

  • -Timo--Timo- Member Posts: 2,313
    edited May 2014
  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2014

    @RThurman said:
    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

    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.

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

    @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!

  • SocksSocks London, UK.Member Posts: 12,822
    edited May 2014

    @RThurman said:
    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!

    Lol, yes, basically we (England) are notoriously bad at penalty shootouts.

  • Fal01Fal01 Member Posts: 460

    @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

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

    @Fal01 said:
    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.

    This might work. It calculates mouse speed and then transfers that speed to the ball velocity.

  • Fal01Fal01 Member Posts: 460

    Thanks a lot for going out of your way to make a demo @RThurman,

    I think that will do the trick! :D

    It’s not a bug – it’s an undocumented feature

  • SocksSocks London, UK.Member Posts: 12,822

    @RThurman said:
    This might work. It calculates mouse speed and then transfers that speed to the ball velocity.

    Brilliant stuff !

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

    @Fal01 said:
    Thanks a lot for going out of your way to make a demo RThurman,

    I think that will do the trick! :D

    Glad it's gonna work for you! (Demos are easy -- typing an explanation isn't.)

    -RT

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,864
    edited May 2014

    @Socks said:
    Brilliant stuff !

    GameSalad makes us all look like genuses, er... geneses, um... genus's, ahh.. smart people!

  • Twayne2Twayne2 Member Posts: 458

    Geniuses. :grin:

  • Twayne2Twayne2 Member Posts: 458

    .

Sign In or Register to comment.