利用Box2D+WCK賦予Flash物理特性 萬有引力

這已經是第五篇Box2D+WCK的介紹文章了,前面幾篇文章如果各位有注意應該會發現,所有範例的萬有引力都跟現在我們生活的環境一樣,物件像是被地心引力給吸引著都會往下方掉落,其實我們在使用這個模組的時候,也可以改變這樣的萬有引力,讓這些物件不要往下掉落而是往我們所指定的方向移動,馬老師在這邊大概製作了三種不同類型的萬有引力範例,分述如下:

1.容器型萬有引力:這個萬有引力是利用一個封閉的空間來繪製的。

Capsule Gravity

大概的製作步驟如下:

我們可以在World元件中繪製一個如下圖的形狀:

Capsule Gravity Zone

接下來將他轉換成一個影片片段,在類別的部分輸入gravity.GravityCapsule的名稱,如下圖所示:

Capsule Gravity Symbol

接下來把這個元件拖曳到World元件裡面就可以了。

2.放射狀萬有引力:這種萬有引力是以往內或往外放射狀的方式存在。

Radial Gravity

我們可以在World元件中繪製一個如下圖的形狀:

Radial Gravity Zone

接下來將他轉換成一個影片片段,在類別的部分輸入gravity.GravityRadial的名稱,如下圖所示:

Radial Gravity Symbol

接下來把這個元件拖曳到World元件裡面就可以了。

3.正弦萬有引力:就是三角函數的sin。

Sine Gravity

我們可以在World元件中繪製一個如下圖的形狀:

Sine Gravity Zone

接下來將他轉換成一個影片片段,在類別的部分輸入gravity.GravitySine的名稱,如下圖所示:

Sine Gravity Symbol

接下來把這個元件拖曳到World元件裡面就可以了。

同樣的也讓大家可以下載以上的三個範例檔,範例檔為CS5格式,下載後要重新設定來源路徑和元件庫路徑喔!希望這個範例對大家有所幫助,如果還有疑問,也可以在這邊回應唷~

You may also like...

15,436 Responses

  1. Профессиональный сервисный центр по ремонту бытовой техники с выездом на дом.
    Мы предлагаем:ремонт бытовой техники в мск
    Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!

  2. Williamuniot表示:

    pinup 2025 – пин ап казино официальный сайт

  3. Kennethedugs表示:

    Of course, he said yes to coming back to the series, which eventually required him to live in Italy for a few months for filming.
    hop exchange
    During production, White revealed to Gries that Greg is “very sinister.” That became rather irrefutable by the season’s climax, which saw Tanya’s demise orchestrated by her now-husband.

    Come Season 3, Gries had to rewrite Greg’s backstory again, this time drawing from some unlikely sources for inspiration, like HBO docuseries “The Jinx,” about late convicted killer Robert Durst, and the case involving the man who came to be known as the Tinder Swindler.

    Gries said he was struck by Durst’s “kind of seemingly even keel personality,” which served as a model for where Greg was headed, someone “who doesn’t really show a great deal of emotion, doesn’t seem to get too angry, just gets a little bit irritated and is dangerous.”

    “There’s a bridled rage underneath. And those kind of people I find – at least with respect to Gary, Greg, Gary – fascinating,” he said.

    And yet, while searching for an empathetic way back to portraying his character, Gries kept wondering if there was anything still redeeming about Greg.
    An important “wake up moment” came during a decisive conversation he had with White just before filming in Thailand, in which the show’s creator said of Greg, in no uncertain terms: “He’s a psychopath.”

    “And that was it. It was like, ‘back to the drawing board.’ And it really did help me,” Gries said.

    The penultimate episode of the series will air on Sunday, an evening that thanks to “Lotus” and other shows has again become a night of appointment viewing amid a general move away from binge watching. Gries said he appreciates the shift.

    “We’re a society that in a weird way doesn’t understand the beauty of waiting. The beauty of the space between the notes,” he shared. “If I binged (‘White Lotus’) I’d feel like I just ate too many chocolates. It just wouldn’t be the same. You need to process this.”

    “The White Lotus” airs Sundays at 9 p.m. EDT on HBO, with the episode available to stream on Max. HBO and Max, like CNN, are owned by the same parent company, Warner Bros. Discovery.

  4. Jamesavata表示:

    пин ап вход – пин ап казино зеркало

  5. Kingnor表示:

    Анонимный чат с психологом телеграм. Психолог помогающий искать решения в непростых психологических ситуациях. Психолог в телеграм.

  6. Boyxyv表示:

    Дипломированный психолог с опытом работы и отзывами клиентов. Психолог в телеграм. Психолог помогающий искать решения в непростых психологических ситуациях.

  7. Williamuniot表示:

    пин ап казино – пин ап

  8. CharlesBrato表示:

    Say hello to AquaSculpt—a game-changer in weight loss! These AquaSculpt capsules use natural AquaSculpt ingredients to shed pounds and boost confidence. No AquaSculpt side effects, just pure AquaSculpt results—see why in AquaSculpt reviews. Learn AquaSculpt how to use and join thousands who love it. AquaSculpt buy today at http://aquasculpt.best

  9. Moneyene表示:

    Чат психологической поддержки. Получить КОНСУЛЬТАЦИЮ и ПОДДЕРЖКУ профессиональных психологов. Получите консультацию онлайн-психолога в чате прямо сейчас.

  10. CharlesBrato表示:

    AquaSculpt weight loss is here to stay! With AquaSculpt capsules, you get fast AquaSculpt results thanks to natural AquaSculpt ingredients. No worries about AquaSculpt side effects—users confirm it in AquaSculpt reviews. Curious AquaSculpt how to use? It’s easy and effective. AquaSculpt where to buy? Visit http://aquasculpt.best and transform your body now!

  11. Danielbor表示:

    ‘White Lotus’ villain Jon Gries reveals the true crimes that inspired his twisty take on Greg/Gary
    fixedfloat exchange
    When Season 3 of “The White Lotus” premiered last month, the shock was palpable when returning character Belinda recognized a familiar face at the resort in Thailand: Greg Hunt, the wily suitor of the late Tanya McQuoid.

    As the season has unfolded, Greg (played by Jon Gries) has emerged as an antagonist, particularly after Belinda dove into the investigation surrounding Tanya’s death and learned that Greg, who now goes by Gary, evaded questioning by authorities.

    On a show famous for reinventing itself, the same has been asked of the actor, who says that playing the ever-shifting character has been a welcome challenge and, like “White Lotus” itself, full of twists.

    “In the beginning, I totally played him for a guy who was, you know, on his last legs,” Gries said in a recent interview with CNN, referencing Greg’s very apparent ill health in the first season of “White Lotus,” which premiered to rave reviews in summer 2021. He added: “When you play a character, you want to find his empathetic side, and you want to understand where they came from, and what got them to where they are.”

    But when he was contacted by creator Mike White about appearing in Season 2, Gries realized he would have to adjust his framing of Greg, despite having previously imagined a “comprehensive history” for him on his own.

    “(White) said, ‘I’m writing it right now, and I’m writing you, and I just need to know here and now: If you’re in, I’ll continue writing. If not, I’ll stop,’” Gries recalled.

  12. Jamesavata表示:

    пин ап вход – пин ап зеркало

  13. CharlesBrato表示:

    Struggling to lose weight? AquaSculpt is transforming weight loss with its natural, fast-acting capsules. Packed with proven AquaSculpt ingredients, these capsules burn fat, boost energy, and deliver real AquaSculpt results in weeks. Curious about AquaSculpt reviews? Users love its effectiveness and zero AquaSculpt side effects. Want to know AquaSculpt how to use? It’s simple—take daily and watch the pounds melt away. Ready to try? AquaSculpt buy now at http://aquasculpt.best and sculpt your dream body today!

  14. Boyrop表示:

    Психолог онлайн анонимно. Круглосуточная запись на онлайн-консультацию психолога. Психолог в телеграм.

  15. Brothereje表示:

    Получить КОНСУЛЬТАЦИЮ и ПОДДЕРЖКУ профессиональных психологов. Получите консультацию онлайн-психолога в чате прямо сейчас. Психолог онлайн чат.

  16. кредит под залог машины
    avtolombard-11.ru/ekb.html
    деньги под залог птс круглосуточно

  17. TracyRak表示:

    Say hello to AquaSculpt—a game-changer in weight loss! These AquaSculpt capsules use natural AquaSculpt ingredients to shed pounds and boost confidence. No AquaSculpt side effects, just pure AquaSculpt results—see why in AquaSculpt reviews. Learn AquaSculpt how to use and join thousands who love it. AquaSculpt buy today at http://aquasculpt.me !

  18. Dwayneseisa表示:

    TadalafilEasyBuy.com cialis without a doctor prescription TadalafilEasyBuy.com

  19. Irontyy表示:

    Анонимный чат с психологом телеграм. Круглосуточная запись на онлайн-консультацию психолога. Психолог онлайн чат.

  20. JesseDex表示:

    пин ап казино зеркало: https://pinupkz.life/

  21. JesseDex表示:

    пин ап казино зеркало: https://pinupkz.life/

  22. Профессиональный сервисный центр по ремонту бытовой техники с выездом на дом.
    Мы предлагаем:сервисные центры в москве
    Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!

  23. Профессиональный сервисный центр по ремонту бытовой техники с выездом на дом.
    Мы предлагаем:сервисные центры в москве
    Наши мастера оперативно устранят неисправности вашего устройства в сервисе или с выездом на дом!

  24. Dewayneepics表示:

    Say hello to AquaSculpt—a game-changer in weight loss! These AquaSculpt capsules use natural AquaSculpt ingredients to shed pounds and boost confidence. No AquaSculpt side effects, just pure AquaSculpt results—see why in AquaSculpt reviews. Learn AquaSculpt how to use and join thousands who love it. AquaSculpt buy today at http://aquasculpt.lifestyle !

  25. TracyRak表示:

    AquaSculpt weight loss is here to stay! With AquaSculpt capsules, you get fast AquaSculpt results thanks to natural AquaSculpt ingredients. No worries about AquaSculpt side effects—users confirm it in AquaSculpt reviews. Curious AquaSculpt how to use? It’s easy and effective. AquaSculpt where to buy? Visit http://aquasculpt.me and transform your body now!

  26. KevinPsync表示:

    AquaSculpt weight loss is here to stay! With AquaSculpt capsules, you get fast AquaSculpt results thanks to natural AquaSculpt ingredients. No worries about AquaSculpt side effects—users confirm it in AquaSculpt reviews. Curious AquaSculpt how to use? It’s easy and effective. AquaSculpt where to buy? Visit http://aquasculpt.xyz and transform your body now!

  27. Williamuniot表示:

    пин ап казино зеркало – пин ап казино зеркало

  28. деньги в долг под залог машины
    zaim-pod-zalog-pts1.ru/nsk.html
    взять займ под залог машины

  29. Dewayneepics表示:

    AquaSculpt weight loss is here to stay! With AquaSculpt capsules, you get fast AquaSculpt results thanks to natural AquaSculpt ingredients. No worries about AquaSculpt side effects—users confirm it in AquaSculpt reviews. Curious AquaSculpt how to use? It’s easy and effective. AquaSculpt where to buy? Visit http://aquasculpt.lifestyle and transform your body now!

  30. Jamesavata表示:

    пин ап – пин ап

發佈回覆給「Boyrop」的留言 取消回覆

發佈留言必須填寫的電子郵件地址不會公開。