- Home /
Check if objects are placed in a certain shape
ok, so im just throwing it out here. I thinking of implementing a way to see if the player placed objects in a certain shape, for example a triangle or a square. I have an Array of spheres which the player can place on the "ground" and i am thinking that, maybe, i have to check for the distance between these objects. Like, if object A is 10m from object B, and the same with object C, i have a triangle. Then it should do something. But i cant really get my head around this nut.
should i go for like: foreach (Gameobject go in gos)...
or: for (int i = 0; i < array.Length; i++)...
... and then check for distance between every sphere-object i have?
Im lost, pls help <3
Answer by tanoshimi · May 20, 2017 at 10:46 AM
I suggest you look at a shape classifier function like P$: http://depts.washington.edu/madlab/proj/dollar/pdollar.html
Your answer
Follow this Question
Related Questions
Setting triangles failing 0 Answers
Rolling sphere "foot" on ground? 2 Answers
Ball Doesn't Roll Down Hill - Physics Problem 3 Answers
Material/Texture on the Inside of a Sphere 5 Answers
Makeing a sphere with rigidbody.AddTorque roll faster 1 Answer