查看: 5174|回复: 7
打印 上一主题 下一主题

[经验分享] 如何使用unity3d制作出真实的物理效果(二)

[复制链接]

5552

主题

2

听众

8万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
11

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

跳转到指定楼层
楼主
发表于 2011-11-12 11:30:00 |只看该作者 |倒序浏览


           Think about what happens to a car in a sharp turn. [...] the part of the car on the outside of the turn gets pushed down toward the road and the part of the car on the inside of the turn rises up. In other words, the body of the car "rolls" 10 or 20 or 30 degrees toward the outside of the turn. If you take a turn fast enough, the tires on the inside of the turn actually rise off the road and the car flips over.
           

           Sounds familiar?
           

           Stabilizer bars "link" the two wheels of the same axle allowing a limited degree of freedom between them. When one of the wheels is pushed upwards, the stabilizer bar transfers a portion of that compression force to the other wheel, so its suspension compress as well. This limits the roll of the body's car at that axle.
         

           If you don't have a stabilizer bar, you tend to have a lot of trouble with body roll in a turn. If you have too much stabilizer bar, you tend to lose independence between the suspension members on both sides of the car.
           

           Q: I haven't heard of such bars! Are really so important?
           

           A: Absolutely. Stabilizer bars are an essential part of a vehicle's suspension system in the same way as springs and dampers are.
         

           Look under your car, observe the suspension behind the front wheels. You'll be able to easily identify a rigid bar that travels from one wheel's suspension to another. That's it. The only exceptions are a very few car models that use dynamic systems (ej. computer-controlled hydraulic systems) to actively emulate the behavior of the anti-roll bars in turns.
           

           IMHO, an AntiRoll script for WheelColliders should be at least mentioned in the documentation and tutorials as a basic requirement for physically real vehicles. Actually, anti-roll bars are barely mentioned in the last chapter of the Unity's Car Tutorial (
           
            http://unity3d.com/support/resources...s/car-tutorial
           
           ), where an alternate car physics model is proposed.
         

           Q: What about all other solutions proposed here? (lower center of mass, angular drag, custom friction models...)
           

           A: The essential requirements for having a car that physically feels like real include the anti-roll bars.
         

           Once you have the REAL absolutely simple car (rigidbody + four wheel colliders + 2 anti-roll bars) you can then apply all other techniques to get special behaviors on your car and/or tweaking its handling, i.e for arcade-style driving.
         

           Even with the real absolutely simple car you'll find a lot of options to tweak and play with, all of them affecting the handling and feel of the car: mass, REAL center of mass (typically moved towards the engine location), front-rear springs, front-rear dampers (must be different because the axle under the engine will support more weight), front-rear anti-roll bar stiffness...
         

           No need for complicated custom friction/drag models at the beginning - leave them for final tweaks if necessary. You'll see how much the handling can change by simply adjusting the difference between the stiffness of the front and rear stabilizer bars.
         

           Q: What's bad with lowering the center of mass?
           

           A: Jumps, collisions, crashes or air-tricks will look weird because of the false center of mass.
         

           Artificially lowering the center of mass is just a workaround that works under some circumstances, but fails at others. Having the REAL center of mass in the car, and making it stable by means of stabilizer bars, will make almost all situations behave like real.
         

           Q: I've***n your demo and I've made the car flip in "Sport" mode!
           

           A: Look at that kind of car. If you do a close turn at high speed with that car in real, surely you'd roll over as well!
         

           If you are (like me) used to watch those "educative" documentaries at Discovery Channel "Road Rampage", "Destroyed in Seconds", and so on, you'll know how easily this kind of cars can roll over at relatively normal speeds. Also, you may have heard about "The moose test", which is a heavy "S" turn test performed at 80 Km/h (50 mph). Many actual cars failed that test (Google for "the moose test" or see
           


            http://en.wikipedia.org/wiki/Moose
            
             _
            
            test
           
           )
         

           Note that in the demo the elevation of the center of mass is around the middle of the car's body! You must do a hard turn at around 60 Km/h (40 mph) for being able to flip the car in "Sport" mode. The anti-roll bars are doing an excellent work already.
         

            
           

分享到: QQ好友和群QQ好友和群 腾讯微博腾讯微博 腾讯朋友腾讯朋友 微信微信
转播转播0 分享淘帖0 收藏收藏0 支持支持0 反对反对0
回复

使用道具 举报

5969

主题

1

听众

39万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

沙发
发表于 2012-2-23 23:28:16 |只看该作者
再次路过……
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

板凳
发表于 2012-6-6 23:19:44 |只看该作者
心中有爱,爱咋咋地
回复

使用道具 举报

462

主题

1

听众

31万

积分

首席设计师

Rank: 8Rank: 8

纳金币
2
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

地板
发表于 2012-6-23 23:20:52 |只看该作者
俺是新人,这厢有礼了!
回复

使用道具 举报

tc    

5089

主题

1

听众

33万

积分

首席设计师

Rank: 8Rank: 8

纳金币
-1
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

5#
发表于 2012-7-8 23:22:32 |只看该作者
“再次路过……”我造一个-----特别路过
回复

使用道具 举报

1023

主题

3

听众

359

积分

设计实习生

Rank: 2

纳金币
335582
精华
0

最佳新人

6#
发表于 2012-9-28 23:26:20 |只看该作者
很有心,部分已收录自用,谢谢
回复

使用道具 举报

nts    

3

主题

1

听众

743

积分

初级设计师

Rank: 3Rank: 3

纳金币
7
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

7#
发表于 2013-10-17 10:39:15 |只看该作者
全是专业级的文件,thx
回复

使用道具 举报

33

主题

2

听众

3903

积分

中级设计师

Rank: 5Rank: 5

纳金币
1893
精华
0

最佳新人 活跃会员 热心会员 灌水之王 突出贡献

8#
发表于 2013-10-17 11:44:10 |只看该作者
飘过~~~~
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

手机版|纳金网 ( 闽ICP备2021016425号-2/3

GMT+8, 2024-11-28 05:39 , Processed in 0.091058 second(s), 28 queries .

Powered by Discuz!-创意设计 X2.5

© 2008-2019 Narkii Inc.

回顶部