将 Physics2D 应用于 3D 游戏对象 - Unity3D [英] Apply Physics2D to 3D Game Objects - Unity3D

查看:38
本文介绍了将 Physics2D 应用于 3D 游戏对象 - Unity3D的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在 3d 游戏对象上使用物理 2D 组件(rigidbody2d、collider2d..etc).我正在计划开发 2 个带有一些 3d 模型的游戏.

Is it possible to use Physics 2D components(rigidbody2d,collider2d..etc) on 3d Game objects. I am planning develop 2 game with some of 3d model.

谢谢!

推荐答案

它不是,但是你可以用rigidbody3d 做的是锁定它的物理运动和旋转.例如,如果您只想让它沿游戏的 x 和 y 轴移动,只需在检查器中勾选刚体组件的冻结 z 移动框即可.

It is not, however what you can do with rigidbody3d is lock the physics movement and rotation on it. For example, if you only ever wanted it to move along the x and y axis of your game, in the inspector just tick the freeze z movement box for the rigidbody component.

这篇关于将 Physics2D 应用于 3D 游戏对象 - Unity3D的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆