Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MeshCollider在游戏中没有实际效果 #58

Open
renegadelyp opened this issue Jun 11, 2019 · 2 comments
Open

MeshCollider在游戏中没有实际效果 #58

renegadelyp opened this issue Jun 11, 2019 · 2 comments

Comments

@renegadelyp
Copy link

renegadelyp commented Jun 11, 2019

1.路面模型添加了MeshCollider和Rigidbody,并设置Rigidbody的type为Kinematic。
2.小车模型添加了egret3d.oimo.BoxCollider和Rigidbody,并设置Rigidbody的type为Dynamic,略微提升了一点y轴坐标,使其高于路面
3.复制了一个路面模型,包含已设置的MeshCollider和Rigidbody,修改了Rigidbody的type为Dynamic,提高了y轴坐标,使其可以下落

运行游戏,可看到小车正常下落、抬高的路面正常下落,但均透过了路面继续下落


在场景中创建一个cube,并放置在小车下方,添加egret3d.oimo.BoxCollider和Rigidbody,并设置Rigidbody的type为Kinematic。

再次运行游戏,小车平稳的落在了cube上(嗯...也不算太平稳...),但下落的路面穿透了一切继续下落


模型和材质均使用Unity导出插件导出


以下是项目文件,请查阅

百度网盘下载链接:
链接:https://pan.baidu.com/s/1RdhKfxPtB29Pydn7SI1q2A
提取码:eo9s

@akdcl
Copy link
Contributor

akdcl commented Jun 13, 2019

MeshCollider 内置碰撞器,还未完善,oimo 是一个比较简单的物理引擎,没有提供凹多边形的功能,所以,复杂地形暂时不能使用 oimo,目前我们考察了几个物理引擎,要不就是功能太过简单,要不就是年久无人维护,暂时没有特别合适的解决方案

@renegadelyp
Copy link
Author

好吧,谢谢大佬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants