OZONE Asylum
Forums
Multimedia/Animation
Isometric projection in Flash.
This page's ID:
29525
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
Ok, I found [url=http://www.kirupa.com/developer/actionscript/isometric_transforms.htm]a tutorial[/url] on isometric projection in Flash but now there's a part I just can't figure out. The tutorial mentions that 2D environments cannot be transformed to 3D environments. True, but that's only because the value of the third dimension is unknown in a 2D world. If we give this third dimension a value, for example, zero, we can then transform the 2D environment into a 3D environment. So, if you didn't notice, I'm trying to transform coordinates of a point to the same point in the 3D environment. Basically, I'd like to reverse the following functions (which are found in the tutorial): [code]// transforms x,y,z coordinates into Flash x coordinate xFla = function (x, y, z) { // cartesian coordinates xCart = (x-z)*Math.cos(0.46365); // flash coordinates xI = xCart+xOrigin; return (xI); }; // transforms x,y,z coordinates into Flash y coordinate yFla = function (x, y, z) { // cartesian coordinates yCart = y+(x+z)*Math.sin(0.46365); // flash coordinates yI = -yCart+yOrigin; return (yI); };[/code] Why? I'd like to transform a mouse click position to the position on the isometric environment. I have looked at many isometric tutorials, this one looks like the best method when it comes to topographic detail. I noticed others use isometric tiles for the landscape, but it is much harder to allow for topographic detail using this method. Correct me if I'm wrong. [url=http://www.zavaboy.com][img]http://asylum.zavaboy.com/zavaboy.gif[/img][/url]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »