当前位置:网站首页>[unity] simulate jelly effect (with collision) -- tutorial on using jellysprites plug-in
[unity] simulate jelly effect (with collision) -- tutorial on using jellysprites plug-in
2022-07-06 10:18:00 【Two water first wood show】
Plug in links : link :https://pan.baidu.com/s/1ZvOnAvFSowBib3ZJ-ombdw
Extraction code :sen5
After importing the plug-in, go directly to Jelly Sprite Demo Scene scene
Core script description :
Body Configuration Determine the shape of the spring ,Num Colliders Number of springs ,Collider Radius Spring radius ,Collider Scale Spring size , Num Attach Points Number of bundled nodes , Attach Point Bundle nodes Eyes
The shader of the object where the script is located is dynamically generated , Shaders will default to Sprite/Defaults Shaders , Maps use UnityJellySprite Of Sprite Parameters ( The first parameter )
Material compatible processing :UnityJellySprite The main texture setting method of the script may be different from that of the old version, and there are also problems of space determination and error reporting, which are modified as follows .
If you need to use your own shader to render the elastic sphere, modify Shader.Find("Sprite/Default") Content is enough .
BlobBehaviour.cs Script description : It is a random time to add a Force The effect of , Let the sphere bounce .m_JellySprite.AddForce Interface to add force ( Note that it is not a rigid body component yes JellySprite(UnityJellySprite Parent script )
problem : How to know collision detection events ?
After running the game, you will find a pile of such objects
It has scripts to monitor physical collision events , And sent events to our objects
So just add event methods to the object script , When it collides with an object, it will send an event to trigger .
Because there are many spring colliders , And the name is the object name Ref Point n In the form of , So we can split the object name and take the first string To identify which sphere it collided with .
We can use these events to do something interesting , such as : A replica of synthetic watermelon .
边栏推荐
- 解决在window中远程连接Linux下的MySQL
- MySQL实战优化高手03 用一次数据更新流程,初步了解InnoDB存储引擎的架构设计
- AI的路线和资源
- Use xtrabackup for MySQL database physical backup
- Good blog good material record link
- 13 medical registration system_ [wechat login]
- UEditor国际化配置,支持中英文切换
- MySQL实战优化高手12 Buffer Pool这个内存数据结构到底长个什么样子?
- The 32 year old programmer left and was admitted by pinduoduo and foreign enterprises. After drying out his annual salary, he sighed: it's hard to choose
- MySQL实战优化高手11 从数据的增删改开始讲起,回顾一下Buffer Pool在数据库里的地位
猜你喜欢
16 医疗挂号系统_【预约下单】
MySQL combat optimization expert 12 what does the memory data structure buffer pool look like?
实现以form-data参数发送post请求
How to make shell script executable
Preliminary introduction to C miscellaneous lecture document
Cmooc Internet + education
UEditor国际化配置,支持中英文切换
MySQL实战优化高手12 Buffer Pool这个内存数据结构到底长个什么样子?
Installation of pagoda and deployment of flask project
Routes and resources of AI
随机推荐
Ueeditor internationalization configuration, supporting Chinese and English switching
Contest3145 - the 37th game of 2021 freshman individual training match_ B: Password
Implement context manager through with
Solve the problem of remote connection to MySQL under Linux in Windows
MySQL combat optimization expert 04 uses the execution process of update statements in the InnoDB storage engine to talk about what binlog is?
Installation of pagoda and deployment of flask project
112 pages of mathematical knowledge sorting! Machine learning - a review of fundamentals of mathematics pptx
C杂讲 双向循环链表
C miscellaneous shallow copy and deep copy
软件测试工程师必备之软技能:结构化思维
Sed text processing
MySQL learning diary (II)
cmooc互联网+教育
简单解决phpjm加密问题 免费phpjm解密工具
Flash operation and maintenance script (running for a long time)
14 medical registration system_ [Alibaba cloud OSS, user authentication and patient]
MySQL底层的逻辑架构
Control the operation of the test module through the panel in canoe (Advanced)
AI的路线和资源
美疾控中心:美国李斯特菌疫情暴发与冰激凌产品有关