- Home /
Trimetric Projection
Hello there,
I've searched an searched, doing some math.. but it seems a bit complicated here. Does anyone have a clue to create a trimetric camera?
Don't get confused with Isometric or demetric because isometric has 3 axes and demetric 2 axes that have the same angle to eachother. In Trimetric view, 3 axes have different angles from eachother.
My question is, How do i create a trimetric camera in unity?
Answer by taoa · Dec 23, 2010 at 03:43 PM
You could attach a script to your camera in which you create a projection matrix so that it gives a trimetric projection, and assign it in place of the camera's projection matrix (already calculated from either it's a perspective or orthographic projection and with the relevant properties).
Hi, is there a simple example you can give me (and share) on how to do that? (i know how to write scripts, but i do not know how to do what you just wrote).
I'm trying to match the trimetric view of Simcity 4.
$$anonymous$$ake your 4x4 projection matrix, and assign it into camera.projection$$anonymous$$atrix, from the script you have attached to you camera game object.
Thanks for your answer, but as i'm really a 'noob' to this i think i have to learn some more about this.. I don't know what parameters i have to set in the 4x4 projection matrix (matrix4x4).
I'm currently looking in the documentation.
http://unity3d.com/support/documentation/ScriptReference/Camera-projection$$anonymous$$atrix.html.
Thank you for the link. I've read it, but i do not understand on how to translate it in to a matrix4x4. I have never ever seen an example of $$anonymous$$atrix4x4.Ortho() for example.
I try to edit this code: http://pastebin.com/Yrks3$$anonymous$$Js ,but doesn't work. Can someone give me please a little example (maybe post a demetric example ins$$anonymous$$d of a trimetric (so i have to change the code for a trimetric)?
I set up a cube and a camera. but when i attach the code to the camera, the screen will become blank.
Answer by HarvesteR · Apr 05, 2011 at 10:33 PM
Uhm, won't an orthographic camera already be trimetric just by itself?
To get an isometric or dimetric projections off an orthographic camera might actually be harder than a trimetric one, since you don't have to match angles...
I'd just set my camera as orthographic, pitch it down some 60 degress, and set it to about 60 degrees off center, so it looks at stuff from an angle...
Now, if you want to have full control of each angle on your projection, the matrix is the way to go.
Cheers
Your answer
Follow this Question
Related Questions
Isometric camera with Spritemanager 2 Answers
Diagonal camera limit 0 Answers
Cinemachine Noise Messes Up Isometric Z as Y Tilemap 1 Answer
Isometric Camera not rendering correctly 0 Answers
Isometric camera skybox not working. 0 Answers