- 最后登录
- 2016-8-29
- 注册时间
- 2012-8-25
- 阅读权限
- 90
- 积分
- 23585
  
- 纳金币
- 20645
- 精华
- 62
|
老外发布的一个摄像机跟随代码,主要用于赛车游戏中,比官方默认的那个效果要更强大些,下面是详细功能简介:
Here's another smooth camera script. Designed to follow a car smoothly and give you the ability to zoom out when the car is moving. Hope someone makes use of it.
target = self explanatory
distance = Standard distance to follow object
height = The height of the camera
heightDamping = Smooth out the height position
lookAtHeight = An offset of the target
parentRigidbody = Used to determine how far the camera should zoom out when the car moves forward
rotationSnapTime = The time it takes to snap back to original rotation
distanceSnapTime = The time it takes to snap back to the original distance or the zoomed distance (depending on speed of parentRigidyBody)
distanceMultiplier = Make this around 0.1f for a small zoom out or 0.5f for a large zoom (depending on the speed of your rigidbody)
Looks best when you place the target transform on the front axle |
|