pepelito

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. pepelito

    Moving parent along with child

    I like you too WIngnut, without you this wouldn't be solved probably The project is for National museum of Slovenia, so the visitors could play this game. I share the same thoughts that BJS will shine bright in a place with plenty of eyes ! Good luck to you too.
  2. pepelito

    Moving parent along with child

    Hello, I solved my problem and here is the PG for that: https://www.babylonjs-playground.com/#11PS7J#1. The main logic that was applied can be seen on line 92. If the picked mesh has a parent, then drag the parent, instead. The problem before was that when the child is dragged than the parent is dragging the child once again and that's why the child was moving more than his parent. I must give almost all the credits to @Wingnut because he helped me a lot with my issue Cheers to @Wingnut and thanks to everyone. Hope that we will hang around more here! I will post my final game that i am working on when i will finish it, so i hope that you can see the final product soon. Cheers.
  3. pepelito

    Moving parent along with child

    Hello, I tried this logic manually setting the position to the parent. It is okay but i dont know why the child is moving faster than parent... If you have any idea i would be very thankful Here is the code that i am using for setting parent position: currentMesh.parent.position.addInPlace(diff); where the diff variable is the change of position of the child mesh. Here is the result: http://buragev.website/Cannon/index2.html On image below: P - parent C - child
  4. pepelito

    Grouping objects

    what this means? is it sarcastic or i am not understanding?
  5. Hello guys, I have a little problem in my scenario. I am able to set the parent child relation among two meshes and i am able to move them along only if the parent mesh is dragged but not counter-wise. Both objects need to be able to be dragged and moved along together no matter which object is dragged. So i will be very thankful if anybody could help me. Thanks!