Page 1 of 1

drawing grid

Posted: Sat Sep 19, 2015 9:01 pm
by kyle.bong2@gmail.com
Hi iforce2d,

Awesome editor by the way! I am looking into drawing similar grid you have in your editor onto cocos2d-x, do you have any pointer doing it?

What I am trying to do is have a grid in background so a user can drag a body around and snap to a grid cell, similar to your editor but in iOS and Android.

Any suggestions would be great!

Thanks!

Re: drawing grid

Posted: Sun Sep 20, 2015 6:34 am
by iforce2d
What exactly are you stuck on? The drawing part is just drawing lines...
The snapping part is just rounding the coordinates of the dragged location...

Re: drawing grid

Posted: Sun Sep 20, 2015 8:05 am
by kyle.bong2@gmail.com
You are correct. My bad I was over thinking it :cry: