当前位置:首页 >> 智能终端演进 >> 【Unity】流体模拟(更新ing),宾得k20d(宾得r202ne放样视频)

【Unity】流体模拟(更新ing),宾得k20d(宾得r202ne放样视频)

cpugpu芯片开发光刻机 智能终端演进 1
文件名:【Unity】流体模拟(更新ing),宾得k20d 【Unity】流体模拟(更新ing) Fluid Simulation

参考于 Sebastian Lague 的项目进行分析学习 流体模拟视频链接


文章目录 Fluid Simulation2D流体Simulation2D.cs


2D流体 Simulation2D.cs 流体的边界用OnDrawGizmos设置流体的边界 void OnDrawGizmos(){Gizmos.color = new Color(0, 1, 0, 0.4f);Gizmos.DrawWireCube(Vector2.zero, boundsSize);Gizmos.DrawWireCube(obstacleCentre, obstacleSize);if (Application.isPlaying){Vector2 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);bool isPullInteraction = Input.GetMouseButton(0);bool isPushInteraction = Input.GetMouseButton(1);bool isInteracting = isPullInteraction || isPushInteraction;if (isInteracting){Gizmos.color = isPullInteraction ? Color.green : Color.red;Gizmos.DrawWireSphere(mousePos, interactionRadius);}}}
协助本站SEO优化一下,谢谢!
关键词不能为空
同类推荐
«    2025年12月    »
1234567
891011121314
15161718192021
22232425262728
293031
控制面板
您好,欢迎到访网站!
  查看权限
网站分类
搜索
最新留言
文章归档
网站收藏
友情链接