Bounty ends tomorrow. Please, anyone have answers?
Hello all,
^ title says it. I am guessing it has something to do with finding the camera rotation and the particle rotation and adding one? maybe.. I am a pretty awful scripter. So I am not sure.
Cheers!
EDIT:
Alright latest version of the script:
var cloudRotations : float[];
function Start () {
var cloudParticles = particleEmitter.particles;
cloudRotations = new float[particleEmitter.particleCount];
for(i = 0; i < particleEmitter.particleCount; i ++){
cloudRotations _= cloudParticles*.rotation;*_
_*}*_
_*}*_
_*function Update () {*_
_*var particles = particleEmitter.particles;*_
_*for(i = 0; i < particles.length; i ++){*_
<em><em>particles_.rotation = cloudRotations *+ camera.main.transform.eulerAngles.z;*_</em></em>
<em><em>_*}*_</em></em>
<em><em>_*particleEmitter.particles = particles;*_</em></em>
<em><em>_*}*_</em></em>
<em><em>_*```*_</em></em>
<em><em>_*<p>This sorta works... It has a few glitches... But its also pretty intense on the CPU.</p>*_</em></em>
<em><em>_*<p>Anyone know a better way thats less glitchy? :P </p>*_</em></em>
<em><em>_*<p>Thanks!</p>*_</em></em>
<em><em>_*<p>EDIT:</p>*_</em></em>
<em><em>_*<p>Bump... Still looking for solutions... Vertex shaders? I am not sure does anyone have any input on this?</p>*_</em></em>
<em><em>_*<p>Cheers!</p>*_</em></em>
<em><em>_*<p>Bump one more time.</p>*_</em></em>
<em><em>_*<p>Started a bounty..</p>*_</em></em>
Can't you use: ParticleEmitter.particles[somenumber].rotation?
– 3dDudeIf that's true then just do if(i=0;i<particleEmitter.particles.length;i++){ParticleEmitter.particles*.rotation = Vector3(Camera.main.transform.rotation.x,Camera.main.transform.rotation.x,0)} right? Be sure to turn of billboarding on the particles though. Let me know if it works.*
– anon73820239I don't thing you can turn off billboarding on particles? Plus the rotation variable is only the local y axis. If you look at the docs it says that particle rotation is a float. If you can access that, I am sure there is Some way to do it... Any ideas?
– 3dDudeAlright a new version is in the first post. Any ideas?
– 3dDudeMay I ask why you want to constrain the rotation to only two axes? I'm wondering if this is a case where you've decided on implementing an answer you came up with when a different approach might be better.
– flaviusxvii