利用Box2D+WCK賦予Flash物理特性 萬有引力
這已經是第五篇Box2D+WCK的介紹文章了,前面幾篇文章如果各位有注意應該會發現,所有範例的萬有引力都跟現在我們生活的環境一樣,物件像是被地心引力給吸引著都會往下方掉落,其實我們在使用這個模組的時候,也可以改變這樣的萬有引力,讓這些物件不要往下掉落而是往我們所指定的方向移動,馬老師在這邊大概製作了三種不同類型的萬有引力範例,分述如下:
1.容器型萬有引力:這個萬有引力是利用一個封閉的空間來繪製的。
大概的製作步驟如下:
我們可以在World元件中繪製一個如下圖的形狀:
接下來將他轉換成一個影片片段,在類別的部分輸入gravity.GravityCapsule的名稱,如下圖所示:
接下來把這個元件拖曳到World元件裡面就可以了。
2.放射狀萬有引力:這種萬有引力是以往內或往外放射狀的方式存在。
我們可以在World元件中繪製一個如下圖的形狀:
接下來將他轉換成一個影片片段,在類別的部分輸入gravity.GravityRadial的名稱,如下圖所示:
接下來把這個元件拖曳到World元件裡面就可以了。
3.正弦萬有引力:就是三角函數的sin。
我們可以在World元件中繪製一個如下圖的形狀:
接下來將他轉換成一個影片片段,在類別的部分輸入gravity.GravitySine的名稱,如下圖所示:
接下來把這個元件拖曳到World元件裡面就可以了。
同樣的也讓大家可以下載以上的三個範例檔,範例檔為CS5格式,下載後要重新設定來源路徑和元件庫路徑喔!希望這個範例對大家有所幫助,如果還有疑問,也可以在這邊回應唷~
Hi there! I just wanted to ask if you ever have any trouble with hackers? My last blog (wordpress) was hacked and I ended up losing several weeks of hard work due to no back up. Do you have any solutions to protect against hackers?
Advanced reading here!
200 mg viagra side effects black viagra pills cenforce and high blood pressure cenforce 250
furosemide dosage range furosemide generic hydrochlorothiazide vs furosemide for edema which case what will digoxin combined with lasix do for aortic stenosis
Hi my family member! I want to say that this article is amazing, great written and include approximately all important infos. I’d like to see more posts like this .
This really answered my drawback, thanks!
Admiring the time and effort you put into your site and detailed info you offer!
latisse logo where can i buy latisse for eyelashes how much is latisse walmart how much is latisse with insurance
casino 888
free slot games for fun
777 lucky slot
штабелер самоходный
https://shtabeler-elektricheskiy-samokhodnyy.ru
I just couldn’t leave your web site prior to suggesting that I really enjoyed the standard info an individual supply to your guests? Is going to be again continuously in order to inspect new posts
I am not sure where you are getting your info, but good topic. I needs to spend some time learning more or understanding more. Thanks for excellent info I was looking for this info for my mission.
How come you do not have your website viewable in mobile format? cant see anything in my Droid.
clomid and multiples clomid 250mg clomid 100mg days 3 7 why only 6 cycles of clomid
buy generic cialis cialis for men female cialis does it work where to buy viagra no prescription
I have read so many posts about the blogger lovers however this post is really a good piece of writing, keep it up
I came across an article that talks about the same thing but even more and when you go deeper.
I’m so happy to read this. This is the type of manual that needs to be given and not the random misinformation that’s at the other blogs. Appreciate your sharing this best doc.
You need to really control the comments listed here
The clarity in your post is just nice and I can tell you are an expert in the subject matter.
штабелер электрический
https://elektroshtabeler-kupit.ru
viagra dosage viagra and cialis australia is 20mg cialis equal to 100mg viagra kamagra where to buy
liquid viagra viagra doses common side effects of viagra what is levitra for
Enjoyed studying this, very good stuff, thanks.
Hello this is a wonderful write-up. I’m going to e mail this to my friends. I came on this while searching on yahoo I’ll be sure to come back. thanks for sharing.
evo pharmacy hydroxychloroquine buy plaquenil friends program
levitra 10 mg bayer how much does levitra cost levitra chemical makeup levitra generico comprar
Clear, concise and easy to access.
I had highly recommend this blog to my good friend, it’s so good