user3054736
user3054736

Reputation: 163

Picking from isometric tiles using transformation matrices

A really have no a problem(app is running), what I want is you help me understanding this

The problem Pick from isometric tiles

Conditions Use transformation matrices

Reference Reference tutorial

My understanding problem(lol) I don't understand in the final part

touch.mul(invIsotransform);

Why the inverted matrix?

Upvotes: 0

Views: 364

Answers (1)

Tenfour04
Tenfour04

Reputation: 93609

That tutorial describes the math for a transform that converts a point in Cartesian coordinates to a point in isometric coordinates. But when you touch the screen that is visually in isometric coordinates, you want to convert it back to Cartesian coordinates to easily pick the correct tile. Inverting the matrix produces a new matrix that does the opposite transformation of going from isometric to Cartesian.

Upvotes: 1

Related Questions