利用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...

6,881 Responses

  1. Jamesric表示:

    buy cheap lipitor online: Lipitor 10 mg price – cheap lipitor online

  2. Discover the perfect blend of style and comfort at marmot clothing.

  3. Jamesric表示:

    prinivil 20mg tabs: Buy Lisinopril 20 mg online – order lisinopril from mexico

  4. DanielTet表示:

    purchase cytotec https://tamoxifen.bid/# low dose tamoxifen
    buy lasix online

  5. Stephenzek表示:

    https://cytotec.pro/# buy cytotec pills online cheap

  6. Jamesric表示:

    cytotec buy online usa: Misoprostol price in pharmacy – cytotec pills buy online

  7. DanielTet表示:

    buy cytotec https://lipitor.guru/# lipitor 20mg
    lasix generic name

  8. WlasovaOlegmrpi表示:

    Хотите “убить” интернет-ресурс конкурента или мошенника? Мы поможем.
    Используем продвинутые технологии, проверенные временем:
    – Ликвидируем онлайн-ресурсы по любым ключевым запросам.
    – Делаем сотни тысяч спамных беклинков.
    – Постоянный спам основного емейла организации письмами с рассылками
    – Устранение позиций онлайн-сайта в поисковиках по любым коммерческим ключевым фразам.
    – Применяются секретные приемы. Многолетний опыт работы.
    – 100% гарантия возврата денежных средств при условии неудачи.
    – Полная отчётность.
    – Секретность работы. Никто про вас и нашу деятельность не узнает.

    Стоимость услуги 7700py.

    Отчётность.
    Оплата: Yoo.Деньги, Bitcoin, МИР, Visa, MasterCard…
    Принимаем USDT
    Telgrm: https://t.me/exrumer
    Skype: Loves.Ltd

  9. WlasovaAlenkamspi表示:

    Желаете забанить веб-ресурс конкурента или мошенника? С нашей фирмой это можно просто выполнить.
    Применяем надежные технологии, только проверенные сотнями проектов:
    – Устраняем сайты по каким угодно ключам.
    – 300000-400000 спамных беклинков.
    – Спамим основную электронную почту фирмы письмами с рассылками
    – Устранение позиций веб-сайта в поисковике по самым коммерческим ключевым фразам.
    – Используются уникальные приемы. Это известно лишь нашим экспертам.
    – Гарантия возврата денежных средств в случае неудачи.
    – Полная отчётность.
    – Абсолютная конфиденциальность заказов. Про вас и нашу деятельность никто не сможет узнать.

    Стоимость услуги 7700 рублей

    Отчётность.
    Оплата: Yoo.Деньги, Bitcoin, МИР, Visa, MasterCard…
    Принимаем USDT
    Телега: https://t.me/exrumer
    Skype: Loves.Ltd

  10. Jamesric表示:

    п»їlipitor price comparison: buy atorvastatin online – brand name lipitor price

  11. Stephenzek表示:

    http://lipitor.guru/# lipitor generic brand

  12. DanielTet表示:

    buy cytotec pills https://tamoxifen.bid/# tamoxifen estrogen
    lasix 100 mg tablet

  13. Stanleyinolf表示:

    lipitor lowest price Atorvastatin 20 mg buy online lipitor 20 mg tablet price

  14. Stephenzek表示:

    https://furosemide.win/# lasix dosage

  15. Mqfbei表示:

    buy besivance – cheap sildamax purchase sildamax online cheap

  16. DanielTet表示:

    purchase cytotec https://cytotec.pro/# buy cytotec over the counter
    lasix uses

  17. Richardsudge表示:

    The man turning jet planes into cool houses
    гей порно член
    Wasilla, south central Alaska. Home to bears, lakes, mountains and a flight school that’s fast becoming a private aviation wonderland.

    At FLY8MA Pilot Lodge, you can opt for a scenic flight tour with glacier views, take the controls for a flying lesson, or go all in and get your pilot training.

    When night falls over the broad vistas of the US state they call the Last Frontier, you can then climb the steps to two unique accommodation experiences: a converted McDonnell Douglas DC-6 airplane and the newest arrival, a McDonnell Douglas DC-9 – still with its DHL livery.

    The fast-developing site is an ongoing project by FLY8MA founder Jon Kotwicki, who previously owned a flight school in Florida, before working as a commercial pilot and eventually ending up in Alaska.

    Flying for the airlines “pays good money and everything, but it’s a very boring job,” he says. “Driving Uber is more interesting because you could talk to your passengers.”

    Having fallen in love with the south central region on a vacation spent hiking, fishing and spotting bears and grizzlies, he chose it as a spot where he and his team – and his trusty Pomeranian dog Foxtrot – could “buy a lot of property and perhaps develop our own airport and run our own show.”

  18. JoshuaDen表示:

    The man turning jet planes into cool houses
    гей член
    Wasilla, south central Alaska. Home to bears, lakes, mountains and a flight school that’s fast becoming a private aviation wonderland.

    At FLY8MA Pilot Lodge, you can opt for a scenic flight tour with glacier views, take the controls for a flying lesson, or go all in and get your pilot training.

    When night falls over the broad vistas of the US state they call the Last Frontier, you can then climb the steps to two unique accommodation experiences: a converted McDonnell Douglas DC-6 airplane and the newest arrival, a McDonnell Douglas DC-9 – still with its DHL livery.

    The fast-developing site is an ongoing project by FLY8MA founder Jon Kotwicki, who previously owned a flight school in Florida, before working as a commercial pilot and eventually ending up in Alaska.

    Flying for the airlines “pays good money and everything, but it’s a very boring job,” he says. “Driving Uber is more interesting because you could talk to your passengers.”

    Having fallen in love with the south central region on a vacation spent hiking, fishing and spotting bears and grizzlies, he chose it as a spot where he and his team – and his trusty Pomeranian dog Foxtrot – could “buy a lot of property and perhaps develop our own airport and run our own show.”

  19. Discover unique fashion pieces at citizens of humanity.

  20. Frankguara表示:

    The man turning jet planes into cool houses
    после анального секса
    Wasilla, south central Alaska. Home to bears, lakes, mountains and a flight school that’s fast becoming a private aviation wonderland.

    At FLY8MA Pilot Lodge, you can opt for a scenic flight tour with glacier views, take the controls for a flying lesson, or go all in and get your pilot training.

    When night falls over the broad vistas of the US state they call the Last Frontier, you can then climb the steps to two unique accommodation experiences: a converted McDonnell Douglas DC-6 airplane and the newest arrival, a McDonnell Douglas DC-9 – still with its DHL livery.

    The fast-developing site is an ongoing project by FLY8MA founder Jon Kotwicki, who previously owned a flight school in Florida, before working as a commercial pilot and eventually ending up in Alaska.

    Flying for the airlines “pays good money and everything, but it’s a very boring job,” he says. “Driving Uber is more interesting because you could talk to your passengers.”

    Having fallen in love with the south central region on a vacation spent hiking, fishing and spotting bears and grizzlies, he chose it as a spot where he and his team – and his trusty Pomeranian dog Foxtrot – could “buy a lot of property and perhaps develop our own airport and run our own show.”

  21. Jamesric表示:

    tamoxifen buy: buy tamoxifen citrate – tamoxifen for gynecomastia reviews

  22. Stephenzek表示:

    https://cytotec.pro/# buy cytotec online fast delivery

  23. Stanleyinolf表示:

    lasix 100mg buy lasix online lasix 100mg

  24. Williebak表示:

    Я всегда считал, что в нашей стране получить собственное жилье – это нечто практически невозможное, особенно для молодых специалистов с ограниченным доходом. Но когда я познакомился с жилищным кооперативом “Бест Вей” и его основателем Романом Василенко, мое мнение кардинально изменилось. Роман, будучи профессионалом в сфере консалтинга и финансов, создал уникальную систему, которая позволяет людям приобретать жилье по доступной цене.Роман Василенко не просто создал кооператив, он тщательно изучил многолетнюю историю кооперативного движения, взял на вооружение лучший опыт других стран и адаптировал его к нашим реалиям. И это работает! “Бест Вей” уже помог тысячам семей обрести свое жилье. Особенно приятно, что кооператив защищает интересы пайщиков даже в сложных финансовых ситуациях. Если возникают трудности, пайщик может вернуть жилье кооперативу и получить свой пай назад, за исключением членских взносов. Прозрачность, надежность и забота о людях – вот что отличает “Бест Вей”. Я горжусь тем, что являюсь частью этого кооператива, и благодарен Роману Василенко за его труд и вклад в улучшение жизни россиян. Благодаря ему у меня появилась уверенность в завтрашнем дне и надежда на светлое будущее.

發佈留言

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