How to drag and move Isometric map?
dumbapps

I found the way to drag and log the data for Isometric map

wade.app.onIsoTerrainMouseMove = function(data)
{
  if (wade.isMouseDown()) {
    console.log(data)
  }
}

But how to setCameraTarget or setCameraPosition using this data to make it move?

All 2 Comments
Gio

Hi

I've attached a script that moves the camera when you click and drag the mouse. It's not exactly what you need but it should be close. Add it to your project and to your scene scripts.

If you want to do this when clicking the terrain only (as opposed to clicking anywhere), then replace the mouse events (such as wade.app.onMouseDown) with the iso terrain events (e.g. wade.app.onIsoTerrainMouseDown).

Also that script works with the right mouse button. If you need another button then change the button number in the script (I think it's 1 == left, 2 == right, 3 == middle)

dumbapps

Gio,

I replace all the onMouse with onIsoTerrainMouse, and it works like a charm.

Thx ;)

Post a reply
Add Attachment
Submit Reply
Login to Reply