Unity3d car

参考:

http://www.gotow.net/andrew/blog/?page_id=78

http://carpe.com.au/slawia/2009/08/unity-wheel-collider-part-1/

http://carpe.com.au/slawia/2009/08/unity-wheel-collider-part-2/

http://carpe.com.au/slawia/2009/08/unity-wheel-collider-part-3/

 

Step 1 : Importing the Game Object.

模型要有四个轮子作为子物体

 

Step 2 : Attaching the Physics Components

向车身添加一个rigidbody

创建一个名为"Colliders"的 empty game object,坐标为(0,0,0),在这个空物体下再创建一些包含有box collider的空物体,使这些box collider接近车身的形状。

2

再创建一个空物体WheelColliders,在其下在创建四个空物体,分别创建Physics/WheelCollider ,调整位置与车轮符合

3

 

Step 3 : Configuring the Physics Setup

 设置三个属性:

  • the vehicle mass 汽车质量 (参考值1600)
  • the suspension spring and damping  悬挂的弹性和阻尼(参考值5500,50)
  • the tire friction 轮胎摩擦(参考值0.092,0.022)
  •  

    Step 4 : 编写代码

     在编辑器中赋值

     

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值