利用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,855 Responses

  1. HaroldGon表示:

    ISIS-inspired suspect planned suicide attack at Taylor Swift concert, Austrian authorities say
    1xbet anniversary promo code
    Police in Austria have questioned three teenagers suspected of plotting a suicide attack at a Taylor Swift show, sparking renewed concerns over the indoctrination of young people online.

    Foreign intelligence agencies helped authorities uncover the alleged scheme, according to the country’s Interior Minister Gerhard Karner. A source familiar told CNN that the US issued a warning to authorities in Vienna.

    Organizers canceled three concerts, which were scheduled to take place in the European capital from Thursday to Saturday. CNN has reached out to Swift’s representatives for comment.

    Investigators unearthed a stockpile of chemicals, explosive devices, detonators and 21,000 euros in counterfeit cash at the home of the main suspect, a 19-year-old ISIS sympathizer who had been radicalized online, according to authorities.
    The young man – who was arrested Wednesday morning in the eastern town of Ternitz – planned to kill himself and “a large number of people,” according to the head of the domestic intelligence agency, Omar Haijawi-Pirchner.

    “He said he intended to carry out an attack using explosives and knives,” Haijawi-Pirchner told reporters in Vienna on Thursday. “His aim was to kill himself and a large number of people during the concert, either today or tomorrow.”

    Two other suspects were detained, aged 17 and 15. The 17-year-old worked for a facilities company that would have provided services at the concert venue. He was near the stadium when he was arrested and had recently broken up with his girlfriend, according to Haijwai-Pirchner.

    Little has been revealed about the 15-year-old. Prosecutors will decide later if he was a witness or directly involved in the alleged plot.

    The three are all Austrian-born with either Turkish, North Macedonian or Croatian backgrounds.

  2. Richardexips表示:

    A chainsaw amnesty is protecting the rainforest in Borneo
    агентство квадратный метр отзывы

    Borneo was once covered in lush, dense rainforests, but they are rapidly disappearing. The Southeast Asian island, roughly three times the size of the UK, has lost half its forest cover since the 1930s, destroying precious habitat for wildlife such as the critically endangered orangutan, as well as valuable carbon stores.

    A non-profit called Health in Harmony (HIH) is asking farmers to hand in their chainsaws in return for money, and a chance to set up an alternative livelihood.

    Borneo is divided between Indonesia, Malaysia and Brunei, and it is estimated that up to 10% of its land is taken up by industrial palm oil and logging operations. But deforestation isn’t just about large-scale tree clearance; some of those behind the logging are small-scale farmers, cutting trees as a sideline to make ends meet.

    Buyback and healthcare
    HIH launched its chainsaw buyback scheme in 2017, under the group’s Indonesian name, Alam Sehat Lestari (ASRI). Farmers who illegally log and sell the wood to timber companies are given around $200 for their chainsaws, as well as up to $450 in financial support for them to set up an alternative, sustainable livelihood, such as opening a shop, organic farming and even beekeeping.

    The scheme also involves addressing the root causes of the problem. According to HIH, many of the farmers who turn to logging do so because they need the money for basics like healthcare.

    “They live far from the healthcare clinics, and they see logging as a place where they can get quick cash,” explained Mahardika “Dika” Putra, conservation program manager at HIH. “If they need this amount of money, they cut this amount of trees.

    “We asked what solutions they think they need to live in harmony with the forest and they said, ‘high quality, affordable healthcare, and training in organic farming.’”

  3. RandyLunda表示:

    farmacia online senza ricetta: Avanafil prezzo – farmacia online piГ№ conveniente

  4. Danielreame表示:

    Betfair Casino Espana
    requisitos bono casino betfair
    Si estas en la busqueda de un casino online en Espana que ofrezca fiabilidad, podria ser la opcion perfecta. Con licencia y cumpliendo con los mas altos estandares de seguridad, este casino destaca por su variada seleccion de juegos proporcionados por los mas renombrados desarrolladores a nivel mundial. Desde tragamonedas clasicas hasta envolventes juegos de casino en vivo, Betfair Casino se ha convertido en el destino favorito de numerosos jugadores espanoles. Descubre en nuestra resena por que Betfair Casino ha logrado captar la atencion de tantos usuarios y conoce en detalle las caracteristicas que lo hacen destacar en el sector.
    Resena sobre Betfair Casino Espana
    Betfair Casino se ha establecido firmemente en el mercado de juegos de azar espanol como una opcion de confianza para los entusiastas del casino online. Operado por Betfair Casino Limited, este sitio esta acreditado por la Comision de Juegos del Reino Unido y la Autoridad de Juegos de Malta, ofreciendo un ambiente de juego seguro y regulado. A continuacion, te proporcionamos informacion relevante sobre Betfair Casino en Espana.

  5. BobbyClert表示:

    Baji Live Casino Overview
    baji 888 live
    Every casino in the world claims that its uniqueness and originality are the reasons for their existence, but what makes Baji Live casino so special is its unique history and modern technologies. Baji Live Casino is not only a place where you can bet your money on games; it’s also a blending of technology and the user interface that altogether gives an unprecedented gaming experience.

    History and Licensing
    Baji Live Casino is licensed by the Curacao Gaming Commission, one of the most problematic and legitimate online casino licences in the world. Why they chose Curacao would do Columbus be the most peaceful and the most economically sound. The most important thing is the game poker license of Curacao. It has these kinds of features:

    International Rights: Curacao’s gaming license is known for its honesty and transparency. It is accepted in many countries and is a legal way for operators to launch services into a wider spectrum of markets worldwide.
    Regulation with Control: Baji Live Casino should stay according to a variety of the different regulations which are the part of the license such as game fairness, user data protection, and the conduct of responsible gaming and security measures.
    Audits and Checks: An auditing team is responsible for conducting regular control procedures of the casino. They are bankrolled by eCOGRA, and their ultimate aim is to ensure casino compliance with convenient, fair play and user safety requirements.
    Transaction Security: Curacao is the place where special attention is paid to the protection of financial transactions, which is essential to the safety and prevention of fraud among the players as well.
    For additional access and to alleviate blockers, our website provides mirror URLs like baji live 365, baji live 999, and baji 888 live. By means of this service, users can make requests as though they are in an unrestricted area and carry out transactions. The whole system, also, gives a high level of trust and security to Baji Live Casino users, which of course makes it really attractive to everybody that wants to either learn or play at an online casino. The stick to such strict licensing standards is the evidence that Baji Live I not only manages, but it is also strengthening its image as a reliable and responsible gambling provider in the market.

  6. TomasRop表示:

    Farmacia online miglior prezzo: kamagra gel prezzo – farmacia online senza ricetta

  7. Timothyzew表示:

    https://farmait.store/# acquistare farmaci senza ricetta

  8. RandyLunda表示:

    miglior sito dove acquistare viagra: viagra senza ricetta – viagra generico sandoz

  9. TomasRop表示:

    farmacie online affidabili: Avanafil compresse – top farmacia online

  10. TomasRop表示:

    farmacie online affidabili: kamagra gel – farmacia online

  11. RandyLunda表示:

    farmaci senza ricetta elenco: kamagra – top farmacia online

  12. Timothyzew表示:

    http://kamagrait.pro/# farmacie online affidabili

  13. Ismaelfer表示:

    What’s up, all is going sound here and ofcourse every one is sharing data, that’s genuinely excellent, keep up writing.

    https://www.speedrun.com/users/farfarlight/followers

  14. TomasRop表示:

    comprare farmaci online all’estero: Farmacie online sicure – farmacie online sicure

  15. NathanDum表示:

    Link pyramid, tier 1, tier 2, tier 3
    Top – 500 links with integration within articles on publishing domains

    Middle – 3000 web address Redirected hyperlinks

    Level 3 – 20000 hyperlinks mix, comments, articles

    Utilizing a link structure is useful for indexing systems.

    Require:

    One hyperlink to the platform.

    Search Terms.

    Correct when 1 keyword from the content heading.

    Note the extra service!

    Vital! First-level references do not conflict with Tier 2 and Tertiary-tier links

    A link hierarchy is a device for elevating the liquidity and link profile of a online platform or online community

  16. Eduardodow表示:

    Клеветники и вымогатели

    Судебное следствие по так называемому делу «Лайф-из-Гуд»– «Гермес»– «Бест Вей» длится с марта сего года, но до сих пор государственное обвинение не показало ни одного подтверждения ущерба 282 млн рублей, который приводится в обвинительном заключении. «Потерпевшие» нагло лгут суду, рассказывая без единого подтверждения об активах. Всем им придется ответить на клевету, вымогательство и мошенничество, как и их кукловодам из питерских ГУВД и прокуратуры.

    Лжепотерпевшие
    Ни один «потерпевший» по уголовному делу не представил документы, подтверждающие неисполнение обязательств перед ними со стороны компании «Гермес»:

    – у них нет документов о том, что они внесли средства на счет;

    – нет исчерпывающих данных об операциях по счетам, включая использование инвестиционного плеча, предоставлявшегося компанией;

    – они не представили достоверную и полную информацию о выводе средств со счета;

    – ни один не представил налоговых деклараций, подтверждающих их активы.

    Суду предлагается поверить им на слово как по суммам, которые они вносили в «Гермес», так и по тому, что они никакие деньги со счетов не выводили или выводили небольшие суммы. Причем слова не подтверждаются ни договорами с компанией «Гермес», ни документами о проводках. Значительная часть из этих «потерпевших» подавала иски в гражданские суды, но пытается «на шару» выгадать в уголовном суде: рассказать сказки о потерянных в «Гермесе» активах.

    Претензии к кооперативу «Бест Вей» предъявляют очень немногие из допрошенных. В числе этих претензий:

    – требования получить то, что им не положено по договору с кооперативом, – вступительный и членские взносы, которые, согласно договору, невозвратные. Причем они предъявляются в том числе и гражданами, которые ранее закрыли договоры с кооперативом и подписали документы об отсутствии к нему претензий;

    – требования вернуть паевые средства от лиц, которые не подавали заявление о выходе из кооператива, остаются членами кооператива.

    МВД подбивает на нарушение закона
    Учитывая давление на суд со стороны руководства МВД, которое отрапортовало руководству страны и Совету Федерации по раскрытии «крупнейшей в истории финансовой пирамиды», фактически получается пшик. Это давление и инспирированные МВД статьи в федеральных СМИ провоцируют «потерпевших» выдумывать претензии, привлекает тех, кто отказывался подавать заявление в качестве потерпевшего на то, чтобы заявить материальные и моральные претензии.

    Правоохранительные органы сознательно подзуживают людей, чтобы увеличить массу потерпевших и требований. Среди 221 лица, признанного потерпевшим, немало тех, кто предъявляет претензии на десятки тысяч рублей – это уровень мирового суда. ГУВД и прокуратура сознательно вводят людей в заблуждение, рассказывая, что не соответствующие договорам требования будут рассматриваться – хотя даже судья Екатерина Богданова обращает внимание в процессе на то, что средства невозвратные.

    Эти требования заведомо не подлежат удовлетворению – они нужны «заказчикам» уголовного дела «для массы», но самих требующих подставляют под гражданско-правовые и уголовно-правовые претензии – так как незаконно, обманным путем претендовать на чужое имущество – воровство и мошенничество: исковые заявления и заявления в правоохранительные органы по фактам такого мошенничества, а также клеветы на физических и юридических лиц уже поданы и подаются на каждого недобросовестного «потерпевшего», выступившего в суде.

    Свидетели обвинения опровергнуты
    Следствие питерского ГУВД очень грубо сфабриковало дело.

    Ключевым свидетелем обвинения является бывший айтишник Набойченко – который обвинил своих бывших коллег в воровстве и мошенничестве. Причем он отказывается идти в суд из-за якобы угроз в свой адрес.

    Однако показания других айтишников, прозвучавшие в суде, полностью опровергают показания Набойченко; другие свидетели, выступая в суде, обвинили в мошенничестве и воровстве самого Набойченко – опустившуюся личность, наркомана.

    Одним из ключевых свидетелей обвинения является также один из водителей «Лайф-из-Гуд» Комаров – который показал на следствии, что возил и передавал неучтенную наличность и про бизнес «знает все», хотя ни к каким бизнес-процессам не был допущен.

    Второй водитель «Лайф-из-Гуд» Александр Прусаков показал в суде, что все это выдумки – никаких денег не возили, никакой тайной кухни бизнеса водителям не было известно.

    Министр, который все время врет
    Уголовное дело буквально рассыпается в суде. «Ущерб» взят с потолка. По итогам суда нужно судить самих следователей и работников Сапетову, Машевского, Винокурова, Негрозова, Вохмянина и других.

    Министр Колокольцев врал в Совете Федерации и в федеральных СМИ, врал правительству и президенту о «великом» уголовном деле с миллиардами ущерба и десятки тысяч потерпевших – это все оказалось выдумкой. Реальными пострадавшими – от действий правоохранительных органов – оказались десятки тысяч пайщиков, в том числе тысячи военных и участников СВО. Ответит ли министр за инсценировку? Спросит ли с него за вранье Валентина Ивановна Матвиенко? Надеемся, что да. Надеемся, что заслуженные «награды» найдут всех «героев» этой дурной пьесы: справедливость должна восторжествовать!

    Клеветники и вымогатели
    И остается надеяться на суд и судью Екатерину Богданову, которая разберется, кто есть кто в этом деле, освободит жертв произвола правоохранительных органов и поможет наказать действительно виновных – сценаристов этого дела из мафии и примкнувшей к ней полиции.

  17. NathanDum表示:

    Link pyramid, tier 1, tier 2, tier 3
    Tier 1 – 500 connections with integration within compositions on article portals

    Secondary – 3000 URL +Redirect links

    Tier 3 – 20000 connections blend, remarks, entries

    Using a link hierarchy is useful for web crawlers.

    Require:

    One link to the site.

    Search Terms.

    Valid when 1 key phrase from the page topic.

    Highlight the extra offering!

    Important! Primary links do not overlap with Tier 2 and 3rd-rank hyperlinks

    A link network is a device for increasing the liquidity and inbound links of a online platform or social network

  18. NathanDum表示:

    Link pyramid, tier 1, tier 2, tier 3
    Top – 500 links with positioning embedded in compositions on writing portals

    Tier 2 – 3000 link Rerouted references

    Tier 3 – 20000 connections blend, posts, articles

    Implementing a link pyramid is useful for online directories.

    Necessitate:

    One connection to the platform.

    Keywords.

    Valid when 1 keyword from the resource topic.

    Observe the additional service!

    Crucial! Tier 1 hyperlinks do not coincide with 2nd and Tertiary-order links

    A link pyramid is a tool for boosting the liquidity and referral sources of a internet domain or social network

  19. NathanDum表示:

    Link pyramid, tier 1, tier 2, tier 3
    Tier 1 – 500 references with inclusion within articles on writing portals

    Middle – 3000 domain Forwarded links

    Level 3 – 20000 references assortment, posts, entries

    Employing a link structure is helpful for search engines.

    Require:

    One reference to the site.

    Key Phrases.

    Accurate when 1 search term from the resource topic.

    Observe the complementary feature!

    Crucial! Top links do not conflict with Secondary and Tier 3-tier connections

    A link network is a instrument for increasing the movement and link profile of a digital property or virtual network

  20. NathanDum表示:

    Link pyramid, tier 1, tier 2, tier 3
    Level 1 – 500 hyperlinks with inclusion within compositions on content domains

    Middle – 3000 web address Redirected hyperlinks

    Lower – 20000 connections combination, posts, posts

    Employing a link network is advantageous for search engines.

    Necessitate:

    One link to the site.

    Query Terms.

    Correct when 1 query term from the page subject.

    Remark the extra offering!

    Essential! Top hyperlinks do not conflict with 2nd and Tertiary-order links

    A link network is a tool for enhancing the liquidity and referral sources of a website or virtual network

  21. NathanDum表示:

    Link pyramid, tier 1, tier 2, tier 3
    Top – 500 hyperlinks with positioning within pieces on content portals

    Tier 2 – 3000 link Forwarded hyperlinks

    Level 3 – 20000 hyperlinks blend, comments, posts

    Using a link pyramid is useful for web crawlers.

    Require:

    One link to the website.

    Keywords.

    Accurate when 1 query term from the website subject.

    Highlight the additional functionality!

    Crucial! Tier 1 hyperlinks do not conflict with Tier 2 and Tier 3-level references

    A link pyramid is a tool for boosting the liquidity and backlink portfolio of a digital property or social network

  22. NathanDum表示:

    Link pyramid, tier 1, tier 2, tier 3
    Primary – 500 links with placement inside articles on article sites

    Middle – 3000 web address +Redirect links

    Lower – 20000 connections assortment, posts, articles

    Employing a link network is helpful for search engines.

    Require:

    One connection to the domain.

    Query Terms.

    Correct when 1 query term from the page subject.

    Observe the extra service!

    Important! First-level links do not intersect with Tier 2 and Tier 3-order connections

    A link network is a mechanism for enhancing the flow and backlink portfolio of a website or virtual network

  23. NathanDum表示:

    Link pyramid, tier 1, tier 2, tier 3
    Level 1 – 500 connections with placement embedded in writings on writing platforms

    Tier 2 – 3000 domain Rerouted references

    Tertiary – 20000 references combination, comments, posts

    Using a link network is beneficial for online directories.

    Demand:

    One hyperlink to the site.

    Query Terms.

    Valid when 1 key phrase from the resource subject.

    Observe the supplementary functionality!

    Important! Primary references do not coincide with Tier 2 and Tier 3-order links

    A link pyramid is a tool for enhancing the flow and referral sources of a website or online community

  24. NathanDum表示:

    Link pyramid, tier 1, tier 2, tier 3
    Top – 500 references with placement inside compositions on content platforms

    Tier 2 – 3000 URL Forwarded connections

    Level 3 – 20000 hyperlinks blend, remarks, articles

    Using a link network is helpful for online directories.

    Require:

    One hyperlink to the site.

    Search Terms.

    Accurate when 1 query term from the website heading.

    Remark the complementary feature!

    Essential! Tier 1 references do not conflict with 2nd and Tertiary-tier connections

    A link structure is a instrument for elevating the liquidity and inbound links of a website or virtual network

  25. NathanDum表示:

    Link pyramid, tier 1, tier 2, tier 3
    Primary – 500 links with integration embedded in articles on writing platforms

    Level 2 – 3000 URL +Redirect hyperlinks

    Lower – 20000 hyperlinks mix, feedback, posts

    Using a link hierarchy is useful for search engines.

    Need:

    One link to the platform.

    Search Terms.

    True when 1 search term from the page subject.

    Remark the additional offering!

    Essential! Top hyperlinks do not conflict with 2nd and Tertiary-level connections

    A link pyramid is a device for elevating the liquidity and referral sources of a website or social network

  26. FobertWen表示:

    Hi, yes this post is really fastidious and I have learned lot of things from it concerning blogging. thanks.

    http://www.tombru.com/mushing/index.php?PHPSESSID=o5f7d9nm1db40uv41nnmb80152&topic=2792.15

  27. NathanDum表示:

    Link pyramid, tier 1, tier 2, tier 3
    Primary – 500 connections with inclusion contained in articles on writing portals

    Level 2 – 3000 domain Forwarded hyperlinks

    Tertiary – 20000 connections blend, remarks, articles

    Using a link network is helpful for web crawlers.

    Need:

    One link to the domain.

    Keywords.

    Valid when 1 keyword from the page title.

    Note the extra feature!

    Crucial! Primary links do not coincide with 2nd and 3rd-order links

    A link hierarchy is a tool for elevating the flow and link profile of a digital property or social media platform

發佈留言

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