Using an orthographic camera, how do you render a 2d sprite in a 3d environment at proper scale?
I'm having trouble getting a sprite to take up the entire Unit of a 3D space.
I'm using an orthographic camera and the typical isometric tile grid ratio (2:1) (45deg horizontal rotation, 30deg vertical rotation). As you can see from the picture, the sprite doesn't extend all the way to the top.
Here's another way to look at it.
The pivot for the sprite is at the bottom, and that pivot is transformed to the bottom right of the cube (colloquially speaking), so I offset it from the parent object accordingly. That's not a problem, it's in the right position. The sprite is 64px, imported as 64px per unit so its w/h should be the same as the w, h of the cube.
Here's where I think the problem is... I have the sprite render at an angle so that it shows up properly on the camera. The sprite, like the camera, is 45deg 30deg rotated... meaning that the scale of it is smaller than it should be (I think).
I figured I just needed to scale up the vertical axis so...
Which gave me ->
I'm curious if there's an easier way to do this or more intuitive. I'm mostly looking for advice on how to get a 2D sprite rendering in an orthographic camera effected by an angle to fill an entire unit of space. For some reason the scale of the sprite hasn't been covering up the entire unit OR covers up too much of the unit. I can kind of tweak the value to get it in the right range, but I'd like to get the value down exactly as this will effect most tiles in the game.
Hopefully I provided enough description. Thank you guys so much! Sorry about the links, instead of inline images, couldn't get markdown to work.
Your answer
Follow this Question
Related Questions
2D Character in 3D Environment 1 Answer
how can I make an orthographic isometric pixel game? Please Help< 1 Answer
Intersecting sprites 1 Answer