In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
Today, the editor will share with you how to use Unity particles to achieve turret launch system related knowledge points, the content is detailed, logic is clear, I believe most people still know too much about this knowledge, so share this article for your reference, I hope you can learn something after reading this article, let's take a look at it.
First, conduct particle effect generation exercise 1. Generate an empty project.
Assets- > Import Package- > Custom Package- > SceneShot.unitypackage
2. Create a particle system
GameObject- > Effects- > Particle System
Create a particle system in the scene and move it in front of the emission tube of the Turret turret object in the scene
3. Change particle system parameters
Duration:3.32
Start Delay:1
Start Lifetime:1-10
Start Speed:Curve
Start Size:0.87
Start Rotation:180
Start Color:Gradent (# 2EFE2E-# FFFFFF)
Simulation Space:Custom
Custom Simulation Space:Cube (Transform)
Max Particles:500
4. Change the parameters of Emission attribute
Rate over Time:0Rate over Distance:0
Brusts:
TimeCountCyclesIntervalProbability01482infinite0.011
5. Change the parameters of Shape attribute
Shape:Sphere
Radius:3.52
Radius Thickness:0
6. Related parameters of launch tube
Inspector- > Position: move to one of the two launch tubes by mouse
Inspector- > Ratation: X, y, z, 0
Inspector- > Particle System- > Start Lifetime:0.5
Max Particles:100
Inspector- > Particle System- > Emission- > Rate:500
Inspector- > Particle System- > Shape:Cone, Angle:0.5
Inspector- > Particle System- > Velocity over Lifetime- > tick, Z: 10
Inspector- > Particle System- > Color over Lifetime- > tick, select red
Inspector- > Particle System- > Renderer- > tick
Render Mode:Stretched Billboard, Length Scale: 0.5
7. Emission tube particle object
(1) Hierarchy- > Particle System- > Edit- > Duplicate, copy another particle object and drag it to the front of another emission tube
(2) run to see the running effect of particles
(3) Click Play button again to end the game.
(4) Press Ctrl+S to save the scene
(5) change the particle parameters in front of another emission tube to observe the difference between the two. If you modify shape- > shape, change the value from Cone to Sprte.
2. Summary of particle system parameters 1. Main panel Particle System
Duration: particle emission period, which means to enter the next particle emission cycle 3.32 seconds after launch. If looping is not checked, the particles will stop emitting after 3.32 seconds.
Looping: particles are emitted periodically.
Prewarm: preheating system, for example, I have a space-sized particle system, but the particle emission speed is limited. I want to fill the particles with space at the beginning. I should check Prewarm at this time.
StartDelay: delay the emission of particles, check it and extend it for a period of time before launching.
StartLifeTime: the length of time from occurrence to disappearance of a particle.
StartSpeed: the speed at which particles initially occur.
3DStartSize: this attribute is used when you need to enlarge the particles in a certain direction.
StartSize: the initial size of the particles.
3DStartRotation: can be used when you need to rotate the sub in one direction.
StartRotation: the initial rotation of the particles.
RandomizeRotation: randomly rotate the direction of the particles, feeling that it is useless in the case of 3D particles, especially circular ones.
StartColor: the initial color of the particles, which can be adjusted to add a gradient.
GravityModifier: gravity correction.
SimulationSpace:a.Local, where the particles follow the parent object. B.World, where the particles do not move with the parent. C.Custom, the particles will move with the specified object.
SimulationSpeed: based on the speed of the Update simulation.
DeltaTime: the first version of DeltaTime is 1, if you need to use Sacled is when the game needs to be paused, according to TimeManager. If you choose UnScale, you will ignore the influence of time.
ScalingMode:Local: the scaling of the particle system, like its own Transform, ignores the parent scaling. Hierarchy: particle scaling follows the parent. Shape: follows the particle system to its initial position, but does not affect the size of the particle system.
MaxParticles: the maximum number of particles a particle system can exist at the same time. If the number of particle books exceeds the maximum, the particle system will destroy some of the particles.
AutonRandomSeed: random seed, if checked will produce a completely different non-repeating particle effect, if checked will be repeatable.
2. Emission module
RateOverTime: the number of particles generated per unit time.
RateOverDistance: the number of particles produced with moving distances. Particles are emitted only when the particle system moves.
Bursts:
Time: start from the second.
Min: minimum number of particles.
Max: the maximum number of particles, the number of particles will be random between Min and Max.
Cycles: the number of cycles in a cycle.
Interval: the interval between two Cycles.
3. Renderer module
(1) RenderMode:
Billboard: particles always face the camera.
StretchedBillboard: stretching plate, you can adjust the scaling of particles according to camera, speed, and length.
HorizontalBillboard: the particle plane is parallel to the Floor plane.
VerticalBillboard: the particle plane is parallel to the Y axis of the world coordinates, but faces the camera.
Mesh: renders particles onto the mesh.
(2) TrailMaterial: attach the material only when you need to use the trailing effect.
(3) Material: the material used to render particles.
(4) SortMode:
ByDistance: renders based on the distance of the particles from the camera.
OldestInFront: the first one rendered is at the top.
YoungestInFront: later rendered in the top layer.
(5) SortingFudge: sort tolerance, which only affects the location of the entire system in the scene. The lower the Sorting value, the easier it is for the particle system to work in other transparent
(6) the opportunity to draw on GameObjects.
(7) Pivot: modifies the pivot point of particle rendering.
(8) VisualizePivot: visual pivot point.
Masking:
CustomVertexStreams: configure which particle attributes are available in the material's vertex shader
CastShadows: use shadows.
ReceiveShadows: specifies whether shadows can be cast on particles, and only Opaque (opaque) materials can accept shadows.
These are all the contents of the article "how to use Unity particles to implement turret launch system in c #". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.