# Joint object point \[edit gravity custom model\]

**URL:** https://forum.babylonjs.com/t/joint-object-point-edit-gravity-custom-model/2064
**Category:** Questions
**Created:** [March 22, 2019, 1:05pm UTC](https://forum.babylonjs.com/t/joint-object-point-edit-gravity-custom-model/2064 "2019-03-22T13:05:18Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![weshuiz13](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/weshuiz13/32/16613_2.png) [@weshuiz13](https://forum.babylonjs.com/u/weshuiz13)
#### Post date: [March 22, 2019, 1:05pm UTC](https://forum.babylonjs.com/t/joint-object-point-edit-gravity-custom-model/2064/1 "2019-03-22T13:05:18Z")

</div>

i was wondering if/how physic’s are applyd to a custom object made in blender as a sample  
after messing around i came up with this  
`newMeshes[0].physicsImpostor = new BABYLON.PhysicsImpostor(newMeshes[0], BABYLON.PhysicsImpostor.MeshImpostor, { mass: 1 }, scene);`  
but to my suprise nothing at all happend what am i doing rong and how could this be solved  
thank you

---

<div class="post-metadata">

### Author: ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)
#### Post date: [March 22, 2019, 3:52pm UTC](https://forum.babylonjs.com/t/joint-object-point-edit-gravity-custom-model/2064/2 "2019-03-22T15:52:43Z")

</div>

Pinging @trevordev

---

<div class="post-metadata">

### Author: ![trevordev](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/trevordev/32/16_2.png) [@trevordev](https://forum.babylonjs.com/u/trevordev)
#### Post date: [March 22, 2019, 6:25pm UTC](https://forum.babylonjs.com/t/joint-object-point-edit-gravity-custom-model/2064/3 "2019-03-22T18:25:14Z")

</div>

If you have a playground I can help debug further.

The issue you may be facing is that when loading certain filetypes that do not have the same handedness as babylon, an empty parent node is added to the file with z scale = -1 , you could try to set it’s child’s parent = null and create the physics impostor on that (now unparented) child.

It is recommended to not use meshes directly for complex shapes, instead using invisible collision boxes. See Authoring and loading a mesh with a collider mesh here [Use a Physics Engine - Babylon.js Documentation](https://doc.babylonjs.com/how_to/using_the_physics_engine).

---

<div class="post-metadata">

### Author: ![weshuiz13](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/weshuiz13/32/16613_2.png) [@weshuiz13](https://forum.babylonjs.com/u/weshuiz13)
#### Post date: [March 23, 2019, 4:59pm UTC](https://forum.babylonjs.com/t/joint-object-point-edit-gravity-custom-model/2064/4 "2019-03-23T16:59:19Z")

</div>

my plans was to re-creaty this [cannon.js mouse pick demo](http://schteppe.github.io/cannon.js/examples/threejs_mousepick.html)  
in baylon since babylon has fitures cannon does not have and tis is easyer to understand  
but i lack knowlage of babylon but instead of a cube i have my own babylon 3d model  
i manged to re-create a part of it mainly the  
marker  
picking up using the pickup/drag - drop sample i will expand later on the sample but having a hard time  
managing it getting working

---

<div class="post-metadata">

### Author: ![weshuiz13](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/weshuiz13/32/16613_2.png) [@weshuiz13](https://forum.babylonjs.com/u/weshuiz13)
#### Post date: [March 26, 2019, 10:46am UTC](https://forum.babylonjs.com/t/joint-object-point-edit-gravity-custom-model/2064/5 "2019-03-26T10:46:05Z")

</div>

as you see in the canon js sample if you click with your cursor on the cube  
it will show a marker  
and the cube will rotate and face towards that point  
is there any propety that does the same as show’n in this sample  
i will handle physics my own

im at this state ofter a bit of reseach and forum post’s  
[https://playground.babylonjs.com/#UB5VZ3#1](https://playground.babylonjs.com/#UB5VZ3#1)

also there seems to be a bug where it cant find box but after a second run it is fine somehow?

---

<div class="post-metadata">

### Author: ![trevordev](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/trevordev/32/16_2.png) [@trevordev](https://forum.babylonjs.com/u/trevordev)
#### Post date: [March 26, 2019, 5:18pm UTC](https://forum.babylonjs.com/t/joint-object-point-edit-gravity-custom-model/2064/6 "2019-03-26T17:18:13Z")

</div>

What do you mean by cant find the box on first run?

To get something like that cannon demo, here is an example that works with ammojs:  
[https://playground.babylonjs.com/frame.html#DGEP8N#4](https://playground.babylonjs.com/frame.html#DGEP8N#4)  
you listen to a click event and move the anchor there

---

<div class="post-metadata">

### Author: ![weshuiz13](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/weshuiz13/32/16613_2.png) [@weshuiz13](https://forum.babylonjs.com/u/weshuiz13)
#### Post date: [March 27, 2019, 2:43pm UTC](https://forum.babylonjs.com/t/joint-object-point-edit-gravity-custom-model/2064/8 "2019-03-27T14:43:07Z")

</div>

only 1 more question how could i achive the same effect as you give without a chain/rope between in  
and second of all  
any idea to mark the place where the user holds clicks or drags the cursor over a 3d object?

---

<div class="post-metadata">

### Author: ![trevordev](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/trevordev/32/16_2.png) [@trevordev](https://forum.babylonjs.com/u/trevordev)
#### Post date: [March 27, 2019, 5:55pm UTC](https://forum.babylonjs.com/t/joint-object-point-edit-gravity-custom-model/2064/9 "2019-03-27T17:55:59Z")

</div>

You could try to do something like this instead by dragging without physics and then applying force when drag is complete [Babylon.js Playground](https://playground.babylonjs.com/#UL64X0)

---

<div class="post-metadata">

### Author: ![weshuiz13](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/weshuiz13/32/16613_2.png) [@weshuiz13](https://forum.babylonjs.com/u/weshuiz13)
#### Post date: [March 28, 2019, 8:08am UTC](https://forum.babylonjs.com/t/joint-object-point-edit-gravity-custom-model/2064/10 "2019-03-28T08:08:30Z")

</div>

ah yes this seems verry intresting im sure i can solve it by by this thanks

after messing with it i came to this  
[https://playground.babylonjs.com/#PLKID0](https://playground.babylonjs.com/#PLKID0)  
it isn’t made for the playground so the ground does not render somehow but that’s not my problem  
do you perhaps know whey it jump after you release it? i need apply the behav on the custom model but since custom models cant i found a demo that solved it by using a shape as a hitbox  
so the skull is the model and the cube is the hitbox
