# Multiple objs distorting (perspective?)

**URL:** <https://discourse.processing.org/t/multiple-objs-distorting-perspective/37045>\
**Category:** Coding Questions\
**Created:** [May 23, 2022, 3:12pm UTC](https://discourse.processing.org/t/multiple-objs-distorting-perspective/37045 "2022-05-23T15:12:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimjimmer](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@jimjimmer](https://discourse.processing.org/u/jimjimmer)\
**Post date:** [May 23, 2022, 3:12pm UTC](https://discourse.processing.org/t/multiple-objs-distorting-perspective/37045/1 "2022-05-23T15:12:41Z")

</div>

Hi I’m curious. I adapted the obj example to try and show 10 rockets in a row… The code works but the width of the rockets seem uneven… They are fatter towards the edges can anyone help?``

```auto
/**
 * Load and Display an OBJ Shape.
 *
 * The loadShape() command is used to read simple SVG (Scalable Vector Graphics)
 * files and OBJ (Object) files into a Processing sketch. This example loads an
 * OBJ file of a rocket and displays it to the screen.
 */

PShape rocket;

float ry;

public void setup() {
  size(2000, 500, P3D);

  rocket = loadShape("rocket.obj");
}

public void draw() {
  background(0);
  lights();

  for (int i =1; i<11; i= i+1) {
    pushMatrix();
    translate(((width)/10)*i, height/2 + 100, -300);
    rotateZ(PI);
    rotateY(ry);
    shape(rocket);
    popMatrix();
  }

  ry += 0.02;
}

```

```auto

```

---

<div class="post-metadata">

**Author:** ![Mikey83](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mikey83/32/17956_2.png) [@Mikey83](https://discourse.processing.org/u/Mikey83)\
**Post date:** [May 24, 2022, 6:50am UTC](https://discourse.processing.org/t/multiple-objs-distorting-perspective/37045/2 "2022-05-24T06:50:16Z")

</div>

Hi @jimjimmer this is because the camera in P3D uses perspective as default, you need to change it to orthographic which is as simple as putting “ortho();” in setup or calling it before the shape is drawn then calling perspective(); after its drawn, problem is then you loose that 3d look, there are settings to ortho and perspective you may want to look at, dont really play around with 3d in processing

---

<div class="post-metadata">

**Author:** ![jimjimmer](https://avatars.discourse-cdn.com/v4/letter/j/67e7ee/32.png) [@jimjimmer](https://discourse.processing.org/u/jimjimmer)\
**Post date:** [May 26, 2022, 12:20pm UTC](https://discourse.processing.org/t/multiple-objs-distorting-perspective/37045/3 "2022-05-26T12:20:45Z")

</div>

Thankyou, that’s perfect

---

<div class="post-metadata">

**Author:** ![Mikey83](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mikey83/32/17956_2.png) [@Mikey83](https://discourse.processing.org/u/Mikey83)\
**Post date:** [May 26, 2022, 12:36pm UTC](https://discourse.processing.org/t/multiple-objs-distorting-perspective/37045/4 "2022-05-26T12:36:02Z")

</div>

No worries then mate, can you mark it as solved please
