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

7,857 Responses

  1. Сервисный центр предлагает починить робота пылесоса samsung сколько стоит ремонт робота пылесоса samsung

  2. NicolasLoole表示:

    https://stromectol.agency/# ivermectin 24 mg

  3. Тут делают продвижение продвижение сайта медицинского центра продвижение сайта медицинского центра

  4. SamuelCic表示:

    https://stromectol.agency/# ivermectin where to buy

  5. Michaelgax表示:

    neurontin over the counter order gabapentin ordering neurontin online

  6. Stevenjaw表示:

    https://zithromax.company/# buy cheap zithromax online
    can you buy zithromax over the counter

  7. Stephenideox表示:

    https://prestigeagency.org/ – работа для студентов

  8. ThomasWhili表示:

    באשדוד הן בדיוק המקום שלך. ותהיה בטוח שהיא תגיע במהירות. שירות דיסקרטי שכזה מתאים לכל הגברים. התיירים המבקרים כאן, אנשי עסקים, מושלם, והן גם משתמשות בגוף הזה בשביל לפנק ולענג אותך ללא גבולות. אתה יכול להזמין נערות בטוח שאתה הולך לקבל את החוויה הטובה נערות ליווי ישראליות

  9. ThomasScunc表示:

    תרגיש משוחרר וחופשי, ומלא באנרגיות חיוביות. וכל זאת כאן קרוב לבית. אתה לא צריך – זוגות רבים מקיימים את יחסי המין במיטה, רגע מרגש ומרטיט לבבות. פעם בחורה אחרת וליהנות מהגיוון. אתה הולך ליהנות מהחוויה כפי שמעולם לא נהנית. אתה הולך לחוות רגעים של עונג דירה דיסקרטית ברחובות

  10. Matthewweind表示:

    can i buy amoxicillin over the counter in australia: Amoxicillin For sale – amoxicillin 500 mg without a prescription

  11. Uhrnle表示:

    augmentin 375mg cost – buy generic augmentin 1000mg buy cheap synthroid online

  12. магазин сейфов предлагает сейф 3 класса взломостойкости взломостойкие сейфы 3 класса

  13. Carlostague表示:

    Can these ultra-exclusive luxury destinations help extend your life? They’d certainly like to try
    pin-up casino review
    When the Six Senses Residences Dubai Marina is completed in 2028, the gleaming 122-story building will be the tallest residential structure in the world, complete with luxury fitness and wellness amenities to match. Residents will be able to lift weights, take an outdoor yoga class or swim laps in a pool more than 100 stories high in the clouds.

    But what if, by living there, people were also extending their lives? That’s the mission of the “longevity floor,” another amenity available to future residents of the Six Senses’ 251 apartments and “sky mansions.” This unique floor will include even more specialized offerings such as crystal sound healing, believed by its practitioners to reduce stress and improve sleep. Or residents can indulge in hyperbaric treatments, breathing in 100% oxygen in a pressurized chamber which has shown promising anti-aging results.

    “The idea around it is that you’re not just purchasing a residence, you’re purchasing a lifestyle,” said Kevin Cavaco, director of marketing for Select Group, the building’s developer.

    “You’re purchasing an opportunity to work on your true wealth — which is your longevity. You’re prolonging your time.”

    Life extension may be a lofty — and dubious — pitch, but it’s a common theme among luxury fitness clubs, opulent new high rises and exclusive retreats. The trend coincides with new scientific studies and a parallel fixation in the tech world, but the provable science behind these promises is often murky.
    Celebrity personal trainer and gym designer Harley Pasternak is used to designing programs for high-profile celebrities including Kim Kardashian, Lady Gaga and Halle Berry. But he’s noticed a shift in the past few years, he told CNN over email, as he’s gained an “influx” of tech founder clients.

    “All of them are definitely more interested in aging, in a way that I’ve never seen prior to five years ago,” he said. “All kinds of biohacking tricks like heat exposure, cold, exposure, certain supplements, training, foraging, and even certain medications.”

  14. Robertnen表示:

    ЖК Резиденция лайф ЖК Космос ЖК Крылья – это строит недобросовестный застройщик – Паритет Девелопмент ИНН 7203567694 Не рекомендую покупать квартиры. Будите обмануты @dontcheatpeople – телеграмм.

  15. Тут делают продвижение сео продвижение медицинских сайтов сео продвижение медицинских сайтов

  16. DonaldDurce表示:

    The magical white stone wonderland with effervescent bathing pools
    1xbet mobile casino
    From a distance, Pamukkale looks every bit like a ski resort, with a cascade of brilliant white slopes and a scattering of tourists at the top, seemingly preparing to slalom down into the valley below.

    So why isn’t it melting away as midsummer temperatures nudge toward 100 Fahrenheit, or 37 Celsius, and the heat hangs in the shimmering air?

    Because this unusual and beautiful wonder, located deep in the sunkissed hills of southwestern Turkey, isn’t snow at all. In fact the water it’s formed from sometimes spurts out of the ground at boiling point.

    And those visitors milling around its upper reaches aren’t going anywhere fast. Most are here to take in the extraordinary spectacle – and either paddle or soak in some of the planet’s most photogenic pools.

    Today, Pamukkale’s travertine limestone slopes and pools, filled with milky blue mineral water, are perfect for Instagram moments, especially as the magic hour evening sun casts their rippled surfaces in hues of pink.

    Gateway to Hell
    But this place was a tourist sensation thousands of years before social media, as first Greeks, then Romans flocked here for the thermal waters and to pay tribute at what was revered as a gateway to Hell.

    Today, Pamukkale and the ancient city of Hierapolis, which sprawls across the plateau above the white terraces, are part of a UNESCO World Heritage site that pulls in coachloads of visitors. Typically, many visit for a couple of hours, but it’s worth spending at least a day in this geological and historical playground.

  17. Сервисный центр предлагает сколько стоит ремонт квадрокоптера jjrc ремонт квадрокоптера jjrc в москве

  18. Explore fashionable styles at tibi clothing.

  19. Сервисный центр предлагает ремонт кофемашин magio рядом отремонтировать кофемашины magio

  20. Stevengreve表示:

    Roman Vasilenko Has a Good Name

    The entrepreneur works honestly and conscientiously.

    Roman Vasilenko, a famous Russian social entrepreneur, public figure, and cultural activist, has faced persecution from law enforcement and political structures since 2021, which led him to leave Russia.

    His good name and unblemished reputation, earned over many years in social entrepreneurship, prompted law enforcement to investigate and dismiss the claims made by his competitors.

    Who is Vasilenko?
    Roman Vasilenko was born into a military family (both his parents were officers in the naval aviation). His childhood and school years were spent in military garrisons.

    He received a military-financial education, graduating from the Yaroslavl Higher Military Financial School. After completing his studies, he served as an officer in the Russian Navy, achieving the rank of Captain, 3rd Rank. He also holds a civilian legal education.

    In 1998, he retired from military service as the head of the financial department of one of the military units of the Leningrad (Kronstadt) naval base of the Baltic Fleet.

    After retiring, he worked in the fields of real estate and finance, including securities, holding positions from financial consultant to director.

    In 2009, he founded the International Business Academy (IBA) in St. Petersburg (state educational license No. 1901 from 25.05.2016).

    In 2014, he established the marketing company “Life-is-Good” and the housing cooperative “Best Way,” later a consumer cooperative. Until February 2021, he served as the cooperative’s chairman, and from February 2021 to February 2022, as chairman of the cooperative’s council. He is now a regular member. He holds a doctorate in economics.

    He has received numerous state and public awards, as have his projects.

    He is married and a father of four.

    Business Trainer
    Roman Vasilenko is a renowned business trainer across the post-Soviet space. He is the founder of the International Business Academy (IBA), which holds a state educational license and is famous throughout Russia for its courses taught by world-class business trainers like Allan Pease, Andreas Vince, and others.

    Vasilenko has lectured at major venues in Russia, including the “Rossiya” concert hall (7,000 attendees), MSA Luzhniki (nearly 9,000 attendees), “Olympic Stadium” (20,000 attendees), and “Gazprom Arena” (30,000 attendees). His lecture fees have reached hundreds of millions of rubles.

    Coach

    Vasilenko is also involved in business coaching and individual business consulting. He is one of the most popular coaches in Russia and the CIS. His enterprise generated 150 million rubles annually, or 2–2.5 million euros, from which taxes were paid.

    Creator of Social Housing Program

    Roman Vasilenko is the author and creator of the largest cooperative housing program in Russia, Kazakhstan, and Kyrgyzstan, primarily represented by the Russian cooperative “Best Way.” The cooperative has 20,000 members across Russia and has acquired 2,635 properties for its members. The cooperative’s financial capital exceeds 4 billion rubles, making it the largest social housing program in the world.

    Professional in the Securities Market

    Vasilenko has studied financial transactions both in Russia and abroad. He has experience in conducting billion-ruble deals, with all necessary taxes duly paid.

    Law-Abiding Taxpayer

    All of Vasilenko’s transactions are conducted officially, and he consistently pays taxes on all his income.

    Management Expert

    Roman Vasilenko is recognized in the world of international business. Few can claim to have collaborated with Donald Trump or shared the stage with Arnold Schwarzenegger, Tony Robbins, Richard Branson, Allan Pease, Andreas Vince, and Muhammad Ali.

    High-Level Competence

    Vasilenko’s level of education and competence is very high. In 2014, he defended his dissertation at the St. Petersburg State University of Economics, earning a degree in economics. The topic was “Strategies and Mechanisms for Developing Affordable Housing Markets in Russia’s Regions.”

    In 2015, he defended another dissertation at the European University in Hanover, Germany, titled “Methodology, Methods, Patterns, and Laws of Road Construction in the Region (Example of Leningrad Oblast)” and earned a doctorate in economics.

    He also holds a master’s degree in law and has extensive knowledge of financial markets gained from studying at leading Western universities and practical experience.

    Business Author

    Roman Vasilenko is a renowned business author in the Russian-speaking world. He wrote the bestseller “Success Hunter: How to Achieve Your Goal,” and is currently working on another book. The accompanying film has garnered 27 million views across various platforms.

    “Success Hunter” is sold in bookstores and online marketplaces across Russia, with multiple reprints amounting to several hundred thousand copies—a record for post-Soviet Russia. The book has earned him millions in royalties.

    He also created the film “17 Secret Laws of Success,” viewed by millions, with a book in development that is expected to become a bestseller.

    Blogger

    Roman Vasilenko’s blogs on social networks, which address current issues of financial and life success, have a multimillion audience.

    Actor

    Roman Vasilenko appeared in the popular film “Women vs. Men: Crimean Holidays” in a supporting but significant role, earning substantial fees.

    Poet and Musician

    Roman Vasilenko is the author of the music and lyrics for the hit song “Life-is-Good,” performed by Russian pop star Grigory Leps. He is the main actor in the song’s music video.

    As the creator of this enduring hit, he continues to receive significant royalties every month.

    Philanthropist

    Since 2016, Roman Vasilenko has provided targeted assistance to children with severe neurological conditions and has funded research into high-tech methods to compensate for key deficits in pediatric neurology and psychiatry.

    He offers free financial consulting to the clinical center “Doctrine” in St. Petersburg and supports the localization and improvement of advanced technologies in Russia.

    Since 2016, he has also been donating to and providing targeted assistance to the Valaam Transfiguration Monastery.

    Since 2013, he has annually organized the cultural-patriotic event “Officer’s Ball,” involving Heroes of the Soviet Union and Russia, delegations from hero cities, and government representatives. The event is held in honor of Victory Day in the Great Patriotic War, aiming to honor the heroes, instill love for the homeland, and promote high moral values among the younger generation.

    Cleared of All Charges

    Roman Vasilenko has a long and highly successful career in Russia and internationally. Over the years, he gained many competitors and adversaries who used their connections and corruption in some Russian law enforcement agencies to initiate criminal proceedings and political persecution, forcing him to leave Russia. Western authorities initially viewed his situation as politically motivated persecution.

    Now, Russian law enforcement has changed its stance, influenced by the significant social impact of Vasilenko’s projects and his high level of integrity. It has been confirmed that Roman Vasilenko is an honest, law-abiding entrepreneur.

    Vasilenko has official and legal sources of income, each generating millions, and all together have made him a billionaire. His wealth is earned fairly, and now there are no obstacles to him continuing to contribute to society.

  21. Тут делают продвижение разработка сайтов медицинских организаций разработка сайта для медицинского центра

  22. WilliamTut表示:

    Comet likely last seen when Neanderthals walked Earth could soon dazzle in the night sky
    Смартфон Samsung Galaxy A05 SM-A055F/DS 4GB/64GB светло-зеленый купить недорого
    A recently discovered comet, known as C/2023 A3 Tsuchinshan–ATLAS, will make its closest approach of Earth on Saturday. Sky-gazers won’t want to miss the event since it may be the last time the comet will be seen in the night sky for another 80,000 years.

    The comet successfully reached perihelion, its closest point to the sun in its orbital path around the parent star, on September 27, and was visible for those in the Southern Hemisphere in September and early October. Now, the icy body is on its way out of the inner solar system and will be visible to those in the Northern Hemisphere in mid-October through early November, according to NASA.

    On Saturday, the comet will come within about 44 million miles (nearly 71 million kilometers) of Earth. The comet is making its first documented flyby of our planet, according to NASA. With its 80,000-year orbit, the celestial body would have been last seen from Earth at the time of the Neanderthals.
    Those looking to catch a glimpse of the once-in-a-lifetime event will want to look in the western part of the night sky, shortly after sunset, according to EarthSky.

    The comet will look like a bright fireball in the dark sky with a long, extended tail. Bill Cooke, lead of NASA’s Meteoroid Environment Office at the Marshall Space Flight Center in Huntsville, Alabama, recommends a pair of binoculars for enhanced viewing of the comet.

    “It’s not going to zing across the sky like a meteor. It will just appear to hang there, and it will slowly change position from night to night,” Cooke said. “If you can see (the comet) with your unaided eye, (using) the binoculars will knock your socks off.”

  23. магазин сейфов предлагает сейф 3 сейфы 3 класса

  24. Michaelgax表示:

    zithromax online pharmacy canada generic zithromax zithromax 250mg

發佈留言

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