New answers tagged

0

The best way to approach this is to get the values of the coordinates to the x axis around the object, then generate the y coordinate using some simple math. function genCircle(x,y,radius,precision){ // x and y are coordinates of object let arr=[]; for(let i=-radius;i<=radius;i+=precision){ let ty=(radius**2-(i)**2)/(y); arr.push([i+x,ty-y]); /...


1

Wrapping a tiled map can be achieved by rendering the TiledMap multiple times if the camera position is closer to the borders of the map than the size of the camera viewport. So for example on a map that is 16 world units wide and viewed by a camera with a viewport width of 8 and the camera is at X=2 then the map needs to first be renderer as normal using ...


0

So I ended up getting it working, I had so many different issues trying to use so many different ways to find out the correct implementation, I had an extra offset in my map.SetTile() call which was putting me off!


Top 50 recent answers are included