blob: 2521b75726dbe38b4fe3c5bcd933403a95aab1e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
using UnityEngine;
public class SetRigidbodySettings : MonoBehaviour
{
public float maxAngular;
private void Start()
{
Rigidbody[] componentsInChildren = GetComponentsInChildren<Rigidbody>();
foreach (Rigidbody rigidbody in componentsInChildren)
{
rigidbody.maxAngularVelocity = maxAngular;
rigidbody.maxDepenetrationVelocity = 10000f;
}
}
private void Update()
{
}
}
|