PopeSpaceous / Solitary

A 2D Puzzle Platformer built with Unity
Other
6 stars 10 forks source link

Add a snap to grid function for tangram puzzle #114

Open PopeSpaceous opened 5 years ago

PopeSpaceous commented 5 years ago

Currently the tangram puzzle has a wonky snap to grid. When it uploads a tangram from the file (grey tangram) it sometimes has gaps in between. The user's tangrams (coloured ones) don't snap exactly to the grid the same way and doesn't line up.

jespirit commented 5 years ago

Just tried the first level on Unity WebGL and I see what you mean. I'll take a look at the code but no promises though.

PopeSpaceous commented 5 years ago

@jespirit the Unity WebGl is not a great example, try the game out either through the release build (if you have windows) or by pulling the repo and trying it in unity. The Tangrams have a function to read pre-made coordinates from a file, so they would normally be arranged. But feel free to take a look. Here's a great example of the snap to grid function working. http://wiebke-koepp.de/ Let me know if you need any help understanding the code, as I was the one who wrote it.