P
P
po4emuch2019-12-08 17:46:53
JavaScript
po4emuch, 2019-12-08 17:46:53

How to implement z coordinate?

Good day. I am studying the .obj format and decided to make a simple view of 3D objects. I ran into an obstacle that I don’t even know how to google correctly. When I turn the object sideways, the object becomes flat. How to display this depth? Swap z with x?5ded0cc622943189869564.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
forspamonly2, 2019-12-08
@po4emuch

everything turns normally for you, just the dog model is flattened. along the z-axis by about 10 times. here I added the simplest scaling

console.log("data loaded");
vertex.forEach(v => (v.z *= 10.0));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question