当前位置:网站首页>If you can't afford a real cat, you can use code to suck cats -unity particles to draw cats
If you can't afford a real cat, you can use code to suck cats -unity particles to draw cats
2022-07-05 16:38:00 【InfoQ】
About author
as everyone knows , Life is a long process , Constantly overcome difficulties , Constantly reflect on the process of progress . In this process, there will be a lot of questions and thoughts about life , So I decided to put my thinking , Share all your experiences and stories , To find resonance !!!
Focus on Android/Unity And various game development skills , And all kinds of resource sharing ( Website 、 Tools 、 material 、 Source code 、 Games etc. )
Premise
A sudden flash of light : Using a
The tailing of particles +DOTween Realization
A cat .(GIF It looks a little stuck , The card is not actually stuck )
Practice process
I will try my best to restore the whole process from zero to some , Instead of coming up, it's a well-designed step .
First we import DOTween plug-in unit :
Don't worry about... After importing , Create a particle , Coordinate for (28.1,22.6,0), Then set their properties as follows :
Mainly the duration and starting size , by the way , And speed , Because we'll use DOTween To control the movement of particles .
Above picture , The emission module sets the particles to 1, Shape module can actually do anything , As long as the size is 0 that will do , Because she needs to keep 1 A and static state .
Then find the trailing module , Check on , Check world space ( No choice, no effect ), The trailing width needs to be smaller , This can highlight the progress feeling of the ECG head .
We create a material ,Shader by Legacy Shaders/Particles/Additive.
Texture Direct selection Default-Particle that will do .
Then we open the particle renderer module , First assign the material to the material and trailing material properties ( In order to be more perfect, we will change the material ).
Okay , We imported... Before DOTween plug-in unit , Now add... Under this particle object DOTween Path Script .
stay DOTween Path Below the script Waypoints, Inside is the path point , Of course, you can also use shortcut keys to create and delete , It's just that this is a specific coordinate point , It's just easier to write .
Let's add a cat's path
So let's go on to create cat eyes and beards :
Let's run it , The effect is coming out .
Ha ha ha ,(>^ω^<) meow ~! Belch ~!
other
author : Xiaokong and Xiaozhi
Xiaokong
Reprint note - Be sure to indicate the source :https://www.infoq.cn/profile/DB2492B85795C4/publish
This Taoist friend, please
Step back
️, I watch you
Extraordinary bearing
, There is a king's domineering spirit in his speech , There will be a great achievement in the future !!! There is
give the thumbs-up
Collection
Today I tell you , Have you ordered it , Your success in the future ️, I don't take a penny , If it doesn't work ️, Or come back to me .
边栏推荐
猜你喜欢
随机推荐
2020-2022 two-year anniversary of creation
Cartoon: what is the eight queens problem?
10分钟帮你搞定Zabbix监控平台告警推送到钉钉群
为季前卡牌游戏 MotoGP Ignition Champions 做好准备!
Win11如何给应用换图标?Win11给应用换图标的方法
tf.sequence_mask函数讲解案例
Pspnet | semantic segmentation and scene analysis
公司自用的国产API管理神器
Cartoon: what is MapReduce?
Oneforall installation and use
Some cognitive thinking
求解汉诺塔问题【修改版】
单商户 V4.4,初心未变,实力依旧!
数据访问 - EntityFramework集成
CISP-PTE之PHP伪协议总结
APICloud云调试解决方案
Spring Festival Limited "forget trouble in the year of the ox" gift bag waiting for you to pick it up~
【深度学习】深度学习如何影响运筹学?
File operation --i/o
今日睡眠质量记录79分