# 2D to 3D conversion

**URL:** <https://discourse.threejs.org/t/2d-to-3d-conversion/1386>\
**Category:** Questions\
**Tags:** map-data\
**Created:** [December 12, 2017, 5:00am UTC](https://discourse.threejs.org/t/2d-to-3d-conversion/1386 "2017-12-12T05:00:01Z")\
**Posts on this page:** 7\
**Page:** 2

<div class="post-metadata">

**Author:** ![sandipnd31](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/sandipnd31/32/612_2.png) [@sandipnd31](https://discourse.threejs.org/u/sandipnd31)\
**Post date:** [December 13, 2017, 4:45am UTC](https://discourse.threejs.org/t/2d-to-3d-conversion/1386/21 "2017-12-13T04:45:47Z")

</div>

@trusktr sir, @prisoner849 see that animal is on air

---

<div class="post-metadata">

**Author:** ![sandipnd31](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/sandipnd31/32/612_2.png) [@sandipnd31](https://discourse.threejs.org/u/sandipnd31)\
**Post date:** [December 13, 2017, 4:51am UTC](https://discourse.threejs.org/t/2d-to-3d-conversion/1386/22 "2017-12-13T04:51:50Z")

</div>

Hello Sir, I know blender but I dont how to apply rigid body for car and road. [See Video](https://youtu.be/MJc2uIi8nK0). Cube is on air but is falling on the road. No matter Y axis its coming on surface

---

<div class="post-metadata">

**Author:** ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Post date:** [December 13, 2017, 7:36am UTC](https://discourse.threejs.org/t/2d-to-3d-conversion/1386/23 "2017-12-13T07:36:27Z")

</div>

Take a look at these [examples](https://threejs.org/examples/?q=physics#webgl_physics_terrain).  
But since you’re using r71, you’re missing many advantages of the latest revision of Three.js.

---

<div class="post-metadata">

**Author:** ![sandipnd31](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/sandipnd31/32/612_2.png) [@sandipnd31](https://discourse.threejs.org/u/sandipnd31)\
**Post date:** [December 13, 2017, 8:52am UTC](https://discourse.threejs.org/t/2d-to-3d-conversion/1386/24 "2017-12-13T08:52:33Z")

</div>

ya same like but that terrain is created in three.js, and I am loaded obj file how to apply that functionality to obj file. I have gave u sample code above check in pen

---

<div class="post-metadata">

**Author:** ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Post date:** [December 13, 2017, 10:01am UTC](https://discourse.threejs.org/t/2d-to-3d-conversion/1386/25 "2017-12-13T10:01:29Z")

</div>

You have `patrol.js`, which creates paths for objects. A path locates above your navmesh, repeating its surface. So, you have two points of the start and the end of the path. Your object, moving along the path, right above the surface. Thus, its _y_ coordinate changes in accordance to the height of a point of the sufrace, where your object locates at the current moment.

---

<div class="post-metadata">

**Author:** ![sandipnd31](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/sandipnd31/32/612_2.png) [@sandipnd31](https://discourse.threejs.org/u/sandipnd31)\
**Post date:** [December 13, 2017, 10:18am UTC](https://discourse.threejs.org/t/2d-to-3d-conversion/1386/26 "2017-12-13T10:18:23Z")

</div>

@prisoner849, see below image, In map different **levels** are there. some levels has X and Z same only changed in Y. Hope u will understand this problem.

![level Y changed](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex035/uploads/threejs/original/1X/3b9c417c55febddba0044a95e43a0fda56e2ed53.png)

---

<div class="post-metadata">

**Author:** ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Post date:** [December 13, 2017, 10:22am UTC](https://discourse.threejs.org/t/2d-to-3d-conversion/1386/27 "2017-12-13T10:22:36Z")

</div>

Why is this a problem? Your navmesh has such coordinates at clicked points, if I got it correctly.

[Previous page](https://discourse.threejs.org/t/2d-to-3d-conversion/1386.md?page=1)
