Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int count = 0;
- if((count = ColAndreas.RayCastMultiLine(0.0f, 0.0f, 5.0f, -3000.0f, -3000.0f, -5.0f, out float[] x, out float[] y, out float[] z, out float[] distance, out int[] modelIds, 20)) >= -1)
- {
- if(count == -1)
- {
- Log.Debug("Hit too many objects.");
- }
- if(count == 0)
- {
- Log.Debug("Hit no objects.");
- }
- if(count > 0)
- {
- Log.Debug("Hit {0} objects. {1} {2} {3} {4} {5}", count, x.Length, y.Length, z.Length, distance.Length, modelIds.Length);
- for(int i = 0, l = count; i < l; i++)
- {
- Log.Debug("x{0} y{1} z{2} distance{3} modelId{4}", x[i], y[i], z[i], distance[i], modelIds[i]);
- }
- }
- }
- /*
- [11:41:24] Hit 15 objects. 20 20 20 20 20
- [11:41:24] x-1688.775 y-1688.775 z-0.6292461 distance2388.295 modelId18313
- [11:41:24] x-2744.518 y-2744.518 z-4.148391 distance3881.345 modelId18350
- [11:41:24] x-1609.507 y-1609.507 z-0.3650196 distance2276.193 modelId17085
- [11:41:24] x-189.4597 y-189.4597 z4.368477 distance267.9372 modelId3378
- [11:41:24] x-299.2448 y-299.2448 z4.002526 distance423.1972 modelId12871
- [11:41:24] x-312.6371 y-312.6371 z3.957885 distance442.1369 modelId12871
- [11:41:24] x-239.8453 y-239.8453 z4.200525 distance339.1935 modelId12935
- [11:41:24] x-243.3909 y-243.3909 z4.188706 distance344.2077 modelId12935
- [11:41:24] x-240.3275 y-240.3275 z4.198917 distance339.8753 modelId12935
- [11:41:24] x-372.3837 y-372.3837 z3.75873 distance526.6315 modelId17100
- [11:41:24] x-78.4583 y-78.4583 z4.738482 distance110.9571 modelId13489
- [11:41:24] x-79.8333 y-79.8333 z4.733899 distance112.9017 modelId13489
- [11:41:24] x-81.37444 y-81.37444 z4.728762 distance115.0812 modelId13489
- [11:41:24] x-81.11153 y-81.11153 z4.729638 distance114.7094 modelId13489
- [11:41:24] x-94.51478 y-94.51478 z4.68496 distance133.6645 modelId3402
- */
Advertisement
Add Comment
Please, Sign In to add comment