言語: 日本語
  • C#
  • JS
  • Boo

スクリプト言語

お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。

MeshCollider.smoothSphereCollisions

Switch to Manual
public bool smoothSphereCollisions;

Description

Sphere のコリジョンに、平らなポリゴンの法線の代わりに、補間された法線を使用します

これにより Sphere が平らな平面を転がる際の凸凹をスムージングします。 欠点は深さのある角を転がる際に異常な動作をする場合があり、Sphere がある方向に引っ張られているように見えます。

using UnityEngine;
using System.Collections;

public class ExampleClass : MonoBehaviour {
    void Example() {
        transform.collider.smoothSphereCollisions = true;
    }
}