2011-10-07 07:57:28 | Querbok

Unityのパーティクルシステムはスケーリングが適応されない。装備品の様にキャラによって自動スケーリングして使うようなモデルにはパーティクルエフェクトは使いにくい。

ParticleScaleController.js

パーティクルエフェクトをスケーリング1.0で作っておいて、上のスクリプトを追加し必要な部分のみOnにして使用。シンプルなものならisSizeControllかisEmissionControllをOnにするだけでok。

主なプロパティーは以下
・ParticleEmitter用フラグ
isSizeControll : Size on/off
isEmissionControll : Emission on/off
isWorldVelocityControll : WorldVelocity on/off
isLocalVelocityControll : LocalVelocity on/off
・ParticleAnimation用フラグ
isSizeGrowControll : SizeGrow on/off
isForceControll : Force on/off
isRndForceControll : RndForce on/off
isDampingControll : Damping on/off

scaleCheckTarget : スケールの参照先、省略すると自分自身を参照
isUseLocalScale : onでlocalScale、offでlossyScale


ただし、Unityの仕様上(3.41現在)、ElipsoidParticleEmitter、MeshParticleEmitter固有のプロパティーへのアクセス方法が無いのでElipsoid値やTangent値はスクリプトから操作出来ない、その為それらはこのスクリプトではスケーリング出来ない。
Elipsoid値に関してはMeshParticleEmitterを使ってSphereをエミッターメッシュとして使うことでスケーリングの影響を受けるようにできる。
 

About   

SmokymonkeySとは、2名からなるインディチームです。 ゲームやその他作品を無所属で個人開発しています。
2002年 WebゲームTRIGLAVを公開。総勢50万アカウントを超える長寿ゲーム。
2015年 3DアクションRPG Ninelivesを開発。現在休止中。
2018年 TRIGLAV モバイル版をリリース。70万ダウンロード達成。
2021年 作場知生氏と共同開発したガラージュ 完全版をリリース。

SmokymonkeyS is a two-man indie team by a programmer and a graphic designer, formed for creating games.
Our 1st game TRIGLAV, a web RPG that has been made with JavaScript has passed over half a million accounts since launched 2002.
2015, Ninelives suspended the development after the alpha phase.
2018, released Triglav for Mobile. Reached 700 thousand download.
2021, released Garage: Bad Dream Adventure. Developed with Sakuba Tomomi.

 

Any Comment?

1581 Posts | Page 1/264
SmokymonkeyS
Could you join Triglav Discord and send me a direct message?
WTF2
No matter what I do, the game doesn't show me any events. Internet connection is working and I am a legit user. So it seems my device is somehow blocked, but why.
SmokymonkeyS
Thanks. I'm considering it properly.
Smox
Some guy asked to realease the triglav on steam. I want to tell that i support this idea too. Since I am a huge fan of your work and i am following since last 7 years you have a huge potential guys. WE ARE SUPPORTING YOU!.
Please Release TRIGLAV on Steam!
<3
SmokymonkeyS
Come to join our Discord and direct message me.
fun26298
我想取回我的帳號fun26298
我的手機設備因為螢幕損壞而無法進行資料轉移,我很喜歡這個遊戲但是我無法取回我努力了5年多的資料,可以協助我取回資料嗎?