How to reduce Unity water particles splash effect? - unity3d

I am trying to extinguish the fire particle using Unity water particle. Which is working. But the water particles Splash effect is overflowing. I tried to scale it but it"s not working. So how can I reduce the splash effect?

To stop the water particles from overflowing you can do a combination of two things:
decrease emission rate of particles or the velocity of particles. You find these things under certain modules. Here is the list of modules:
To change the emmission rate, find the particle system in the inspector and go to the emmission module. If not already opened - open it. Adjust the Rate over Time variable to a lower value, you should notice a lot less particles being formed.
Then to change the velocity of the particle system, this one can be change a few ways. And, it depends on how you change it for your water to go upwards. A good place to check is in the Velocity over Lifetime module and you want to decrease the speed modifier or the linear velocity values.
You may also want to check if lowering any velocity values from Limit Velocity over Lifetime, Inherit Velocity, Force over Lifetime solves your issue.
EDIT
To stop emitting particles just set the prediscussed particle emission Rate over Time back to 0. To do this inscript:
GetComponent<ParticleSystem>().emission.rate = 0.0f; // Or a higher number if you want to restart it
Also, when I notice your particle system, you don't have to add burst like I have done so in the examples. Just change the specific variables mentioned.

Related

How can I increase the number of particle sprites?

I am making a defense game. Since the concept of the game is Christmas, we are using Christmas-specific particles, but since the number of sprites used for particles is so small, we need a way to increase the number of sprites. Is there a way to increase it in a particle system?
I've tried many things in the 'particle system' in the particle inspector to increase the number of particles, but I can only adjust the size.
Double-check that your Max Particles count is set to the desired number (default: 1000). If it is, then the settings you're looking for are located in the Emission and Shape modules of the Particle System:
By default, the Rate over Time is 10 particles per second; you could increase this value to have more particles. Alternatively, you could create Bursts of particles instead.
The default Shape is a 25-degree-angle Cone which faces the Z-axis. Feel free to change the Shape and/or the properties like position and scale to get your desired result.
I would also suggest looking at Unity Learn: Introduction To Particle Systems if you're new to this system.

Unity bouncing ball miraculously gains height

I have a sphere with bounciness set to 1
The ball has no drag and uses gravity
It hits a platform, which has bounciness set to 1 and no friction
Yet, the ball bounces higher on every bounce, going to infinity. How is such a thing possible, when I have not given it any extra momentum?
The issue comes from the fact that physics in games happens in discrete frames, and that a moving object will be "inside" another at the frame where there is a collision. The physics engine then has to separate the objects before the next frame, and figure out how much energy to "bounce" with.
One of the steps to do this involves figuring out how much the objects overlap, and that's where this phantom extra energy is comin from. Less error in the overlap equals less error in the energy.
Don't fiddle with the bounciness; those are naive solutions, not to mention they sidestep the issue rather than solving it.
What you should do is to fix what's wrong with your collisions. That can be done a number of ways, the most appropriate/performant of which depends on each specific game:
Increase your physics frame rate (decrease fixed delta time). This reduces overlaps and makes physics frames "smoother". It doesn't really solve phantom energy though; only makes it's causes and effects smaller (maybe so small they become unnoticeable, which is all you need).
Set your sphere's collision detection method to Continuous Dynamic,
and set your ground to static. If you need the sphere to collide with
other stuff, those other stuff present similar issues, and those need
to be non-static, set their rigidbodies' collision detection method
to Continuous. (This is the method I most often find to be the best, but I've had projects where others were better for various reasons)
Increase your Default Solver Velocity Iterations
Change your solver type to Temporal Gauss Seidel
I have had a similar issue with javascript/html/css canvas animations. I have no explanation for this. Use a number like 0.99999 or 0.969399 and that should do the trick. I do get what you mean though it's weird. Just get close to 1. That's all I can say. I hope this helps anyway.

Unity3D - How to have continuous particle emission?

I've recently upgraded my project to 5.6.1f1.
I have a homing missile that tracks a target, and has a particle system attached to it to simulate the smoke.
Before I upgraded the project, the smoke worked well. I had a continuous supply of particles behind the missile that had a nice smoke effect. I forget which version of Unity I used before the upgrade (I think 5.4), but the emission module of the particle system only had a rate setting.
Now that I have upgraded to 5.6.1f1, my particles from my smoke are separated, like the steam coming out of a steam train:
The emission module now has rate over time and rate over distance. I've played around with these settings but nothing seems to adjust to how I want.
I've narrowed down to the fact that my missile is travelling at a very high speed. If the missile travels slower, then the particles look better. But, a missile is a missile and travels fast like my other objects. In the previous version of Unity I was using (I think 5.4), the speed of the missile did not affect the emission of the particles.
So, I guess my question is: How can I have a continuous emission of particles that isn't affected by speed?
(For reference, here is how I want my particles to look, regardless of the speed the missile is travelling)
For anyone looking for an answer to the same problem, I found this post.
"From Unity 5.5 onward, particle system (PS) that uses emission rate over distance or inherit velocity (both heavily used in our particle effect assets) and is parented to a rigidbody (RB) object will appear not functional when you drag the object (with RB component) or change the position values in transform component.
The reason is that RB velocity has overriden any form of position translation to feed the velocity values to PS modules which require velocity data to work properly. Simply put, you should use Rigidbody.velocity (not even Rigidbody.position which is for detecting boundary) instead of Transform.position/Translate to move the object."
I simply changed:
transform.position += transform.forward * speed * Time.deltaTime;
to
rb.velocity = transform.forward * speed * 40 * Time.deltaTime;
Which gave a similar speed and the smoke was not separated.
I had this problem once. The particles are inheriting the parents velocity. I can't remember where it is located, but there is a property called "Emitter Velocity Scale" that should be set to 0.
This should be located somewhere on the particle system itself.
There is also an answer about something changing in the particle system on that specific update.. Quoted from this unity forum post:
Under the particle system click the renderer tab to open it, check the material slot if it says none click the circle on the material tab and choose the Default Particle Material and then it will work right.

Swift 2: Different gravity to different sprites

I am creating a game where i need to be able to change the speed of the player sprite. I think the best option is to effect the sprites by gravity. To give the user the feeling of movement I want the background to move in the exact same speed just in the opposite direction.
How can i give the background a different gravity then the player sprite?
If you know about a better approach I would really appreciate your suggestions as well.
You can change the linearDamping property of a node to change the rate that it falls. From the docs,
This property is used to simulate fluid or air friction forces on the
body. The property must be a value between 0.0 and 1.0. The default
value is 0.1. If the value is 0.0, no linear damping is applied to the
object.
Note that linear damping will also affect the node's side-to-side movement as well.

New to unity and particles & gravity

I am fairly new to Unity3D and thought I'd give it a go to make physics models.
Here is what I would like to do:
Particles, white small ones, that "stream" outwards from a point, 360 degrees(4/3*πr3) in a shape of a sphere, a growing sphere. The paritcle system should release new bursts of "expanding spheres" quite rapidly and sometimes not as rapid. If I add another primitive to the scene, the particles should bounce in the opposite direction when they hit the surface of that primitive and when they bounce the particle "loses energy" and starts to fade away eventually.
I found the "Particle System" but it does not seem to spawn a ready flow of particles to generate a "exploding effect" that I am after. I hope someone with more experience could help me out :)
You could use the options under the particle system called bounce. and set it from 0 to 1 depending on how much you wanted it to bounce off. everything inside of the collisions tab is what you want, and adding a set amount of burst, would give the impression of a wave, bursts are under emission they need an amount and delay from start of the system.
For the sphere shape you go under the shape category and change shape from cone to sphere.
hope this helps.