MeshCollider.smoothSphereCollisions 平滑球碰撞器

var smoothSphereCollisions : bool

Description描述

Uses interpolated normals for sphere collisions instead of flat polygonal normals.

为球体碰撞器使用内插法线而不是平面多边形法线。

This smoothes out bumps for sphere's rolling over smooth surfaces. The downside is that rolling over steep corners can behave really strangely and appears like it is pulling the sphere in some direction.

这可以让球体在平面上的滚动更加平滑。缺点是,在陡峭的角落滚动表现得奇怪,就像在某个方向拉动这个球体。

using UnityEngine;
using System.Collections;

public class example : MonoBehaviour {
	public void Awake() {
		transform.collider.smoothSphereCollisions = true;
	}
}
transform.collider.smoothSphereCollisions = true;
Page last updated: 2010-12-12