You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//public WhenToRun WhenToRunMethodOnCollision; //I hate this name, please someone figure out a better naming scheme for everything in this file just so that this variable can have a better name, please!
36
+
37
+
//bool Burst = true; //force on, because burst is better, and trying to have support for both burst and non burst is getting tiresome, feel free to add your own support for non burst if you need to
38
+
39
+
publicbooldebug;
40
+
20
41
[System.NonSerialized]
21
42
publicuintMeshId;
22
43
@@ -28,18 +49,41 @@ public class FlexCollider : MonoBehaviour
28
49
29
50
intShapeIndex;
30
51
52
+
publicenumWhenToRun
53
+
{
54
+
Update,
55
+
FixedUpdate
56
+
}
57
+
58
+
boolRunMethod;
59
+
60
+
[System.NonSerialized]
61
+
publicintParticleId;// try to avoid using, this is heavilly deprecated
Copy file name to clipboardExpand all lines: Assets/Scripts/FlexStuff/FlexContainer.cs
+33-1Lines changed: 33 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -195,6 +195,11 @@ public struct ShapeBuffers
195
195
publicFVector<XQuat<float>>Rotations;
196
196
publicFVector<int>Flags;
197
197
198
+
publicFVector<Vector4>ContactPlanes;
199
+
publicFVector<Vector4>ContactVelocities;
200
+
publicFVector<int>ContactIndices;
201
+
publicFVector<uint>ContactCounts;
202
+
198
203
publicboolShapesChanged;
199
204
publicintNumShapes;
200
205
@@ -204,6 +209,11 @@ public void InitVectors()
204
209
Positions.InitVec();
205
210
Rotations.InitVec();
206
211
Flags.InitVec();
212
+
213
+
ContactPlanes.InitVec();
214
+
ContactVelocities.InitVec();
215
+
ContactIndices.InitVec();
216
+
ContactCounts.InitVec();
207
217
}
208
218
209
219
publicvoidMapVectors()
@@ -212,6 +222,11 @@ public void MapVectors()
212
222
Positions.MapVec();
213
223
Rotations.MapVec();
214
224
Flags.MapVec();
225
+
226
+
ContactPlanes.MapVec();
227
+
ContactVelocities.MapVec();
228
+
ContactIndices.MapVec();
229
+
ContactCounts.MapVec();
215
230
}
216
231
217
232
publicvoidUnmapVectors()
@@ -220,6 +235,11 @@ public void UnmapVectors()
220
235
Positions.UnmapVec();
221
236
Rotations.UnmapVec();
222
237
Flags.UnmapVec();
238
+
239
+
ContactPlanes.UnmapVec();
240
+
ContactVelocities.UnmapVec();
241
+
ContactIndices.UnmapVec();
242
+
ContactCounts.UnmapVec();
223
243
}
224
244
225
245
unsafepublicvoidSendBuffers()
@@ -233,7 +253,8 @@ unsafe public void SendBuffers()
233
253
234
254
unsafepublicvoidGetBuffers()
235
255
{
236
-
Debug.Log("?????? YOU CANT GET SHAPES, THIS FUNCTION SHOULD NEVER RUN!!!!!!!!!!!!!!!!!!!");
256
+
//Debug.Log("?????? YOU CANT GET SHAPES, THIS FUNCTION SHOULD NEVER RUN!!!!!!!!!!!!!!!!!!!"); Removed cause you can get contacts, so GetBuffers has a purpose now...
SBuf.ContactPlanes=newFVector<Vector4>(Library,MaxParticles*6);// 6 appears to be the max amount of contacts a particle is allowed to have according to triggervolume.h in the demo app
0 commit comments