質問編集履歴
1
isKinematicのON/OFFを追加。
test
CHANGED
File without changes
|
test
CHANGED
@@ -108,6 +108,8 @@
|
|
108
108
|
|
109
109
|
{
|
110
110
|
|
111
|
+
**other.gameObject.GetComponent<Rigidbody>().isKinematic = true; /*isKinematicをONに*/**
|
112
|
+
|
111
113
|
other.gameObject.transform.parent = transform;//親子を設定
|
112
114
|
|
113
115
|
Debug.Log("parenting");
|
@@ -144,6 +146,8 @@
|
|
144
146
|
|
145
147
|
{
|
146
148
|
|
149
|
+
** other.gameObject.GetComponent<Rigidbody>().isKinematic = false;/*isKinematicをOFFに*/**
|
150
|
+
|
147
151
|
other.gameObject.transform.parent = null;
|
148
152
|
|
149
153
|
Debug.Log("unparenting");
|
@@ -156,4 +160,6 @@
|
|
156
160
|
|
157
161
|
}
|
158
162
|
|
163
|
+
|
164
|
+
|
159
165
|
```
|