当前位置:网站首页>Unity布料系统_Cloth组件(包含动态调用相关)
Unity布料系统_Cloth组件(包含动态调用相关)
2022-06-26 21:58:00 【suixinger_lmh】
Unity布料系统
说明:
unity自带的布料物理系统
使用:
- 新建空物体;
- 添加cloth组件,unity会自动附带skinned mesh renderer组件;
- 将需要的网格和材质,赋值给skinned mesh renderer组件;
- 点击cloth组件的左上角的图标(Edit cloth constraints);
- scene面板中会出现布料参数调节面板(看不到的打开Gizmos,显示场景图标);
- 在模型上选中对应顶点(顶点过大或过小的话,调节Constraint Size的大小到合适的值);
- 根据需求对选中的点进行限制(例如:连接旗杆的那条边一般不会动,勾选Max Distance 值设置为0;让其不能移动);
要点:
1.布料系统目前只能和Capsule Collider 以及Sphere Collider 两种碰撞体交互;
2.要将参与布料物理系统的物体的碰撞体拖入cloth组件的碰撞体组中;
动态调用相关:
问题:
看布料的使用方式基本上就是不建议动态去使用,但其实动态去使用也是可行的。
不过动态调用存在很多问题:
- 动态的给cloth组件添加碰撞体,虽然可以一直添加,但是超过一定数量时,多余的碰撞体并不能够产生物理效果。
- 在布料系统发生物理效果时,如果去改变(删除)碰撞体个数,物理效果会产生突变。在暂时无交互时改变是可行的。
- 添加到布料系统中的碰撞体,即使将物体隐藏掉,enable=false掉,依旧会产生物理效果,甚至于使用position=newpos来改变碰撞体的位置,newpos和当前路径之间经过布料系统,依旧能够发生物理效果。
第三条的效果有些类似于character controller与刚体的一些特性,但布料貌似是将所有数据都放在布料系统里计算了。
这就很坑,要解决第三条,就要把碰撞体从cloth中移除,要移除,就会碰到第二条的问题,需要保证cloth没有在交互中。
因为是直接使用的,等回头看看官方文档再做修改。
边栏推荐
- 买股票通过中金证券经理的开户二维码开户资金是否安全?想开户炒股
- 基于启发式搜索的一字棋
- Is it safe to buy stocks and open accounts through the account QR code of the CICC securities manager? Want to open an account for stock trading
- Which securities company is the most convenient, safe and reliable for opening an account
- The importance of using fonts correctly in DataWindow
- Unity3D插件 AnyPortrait 2D骨骼动画制作
- Centos7编译安装Redis
- Data governance does everything
- Using C to operate SQLSERVER database through SQL statement tutorial
- fastadmin极光推送发送消息的时候registration_id多个用逗号分割后无效
猜你喜欢
leetcode:710. 黑名单中的随机数【映射思维】
Yolov6: the fast and accurate target detection framework is open source
【题解】剑指 Offer 15. 二进制中1的个数(C语言)
leetcode:141. Circular linked list [hash table + speed pointer]
[fundamentals of image processing] GUI image histogram equalization system based on MATLAB [including Matlab source code 1924]
[leetcode]- linked list-2
What are the accounting elements
茂莱光学科创板上市:拟募资4亿 范一与范浩兄弟为实控人
Matrix derivation and its chain rule
QT环境下配置Assimp库(MinGW编译器)
随机推荐
AI intelligent matting tool - hair can be seen
网络爬虫2:抓取网易云音乐评论用户ID及主页地址
Yolov6: un cadre de détection de cibles rapide et précis est Open Source
美术向的Unity动画知识
AI智能抠图工具--头发丝都可见
不同的子序列问题I
Release of dolphin scheduler video tutorial in Shangsi Valley
Yolov6: the fast and accurate target detection framework is open source
YOLOv6:又快又准的目標檢測框架開源啦
这个算BUG吗?乱填的字母是否可以关闭
[bug feedback] the problem of message sending time of webim online chat system
leetcode:152. Product maximum subarray [consider DP of two dimensions]
Unity3D插件 AnyPortrait 2D骨骼动画制作
leetcode:141. 环形链表【哈希表 + 快慢指针】
Android mediacodec hard coded H264 file (four), ByteDance Android interview
买股票通过中金证券经理的开户二维码开户资金是否安全?想开户炒股
Is there any risk in opening a new bond registration account? Is it safe?
花店橱窗布置【动态规划】
Introduction to dependency injection in SAP Spartacus
卷积神经网络(CNN)详解及TensorFlow2代码实现