text: [{"Owner":"vahith","Date":"2015-04-28T05:39:39Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_Hi all_co__lt_br_gt_here i am creating dynamic wall by selecting mouse point.when some meshes are collided with wall the collision is not working and i want to create ground once room shape is completed..so kindly suggest me how i can achieve this.._lt_br_gt__lt_br_gt_here i am attaching my demo playground for reference_lt_br_gt__lt_a href_eq__qt_http_dd_//www.babylonjs-playground.com/#1U68CD%2312_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//www.babylonjs-playground.com/#1U68CD#12_lt_/a_gt__lt_br_gt_Thnaks _lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Kilombo","Date":"2015-04-28T10:26:04Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tGood morning_co_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tTry this post _lt_a href_eq__qt_http_dd_//www.html5gamedevs.com/topic/12990-how-to-collision-2-object/?hl_eq_movewithcollisions#entry74655_qt_ rel_eq__qt__qt__gt_http_dd_//www.html5gamedevs.com/topic/12990-how-to-collision-2-object/?hl_eq_movewithcollisions#entry74655_lt_/a_gt_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThis exact example is quite good _lt_a href_eq__qt_http_dd_//playground.babylonjs.com/#1NQTNE%2311_qt_ rel_eq__qt_external nofollow_qt__gt_http_dd_//playground.babylonjs.com/#1NQTNE#11_lt_/a_gt_ it uses scene.pick.\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Wingnut","Date":"2015-04-28T14:32:08Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_\n\tHi Vahith!  Um_co_ nice indenting.  _lt_img alt_eq__qt__dd_)_qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ width_eq__qt_20_qt_ data-emoticon_eq__qt__qt_ /_gt_  You_t_ll get more love from helpers... with better indenting.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tVahith_co_ are you wanting collision-checking to happen WHILE you are drawing the walls?  I bet so.  You don_t_t want the user to be able to draw a wall THROUGH a wall_co_ right?\n_lt_/p_gt_\n\n_lt_p_gt_\n\tmesh.scaleWithCollisions()_sm_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tUse that function instead of moveWithCollisions.  What_t_s that you say?  .scaleWithCollisions() doesn_t_t exist?  hehe.  Yeah_co_ I know.  Neither does .rotateWithCollisions(). \n_lt_/p_gt_\n\n_lt_p_gt_\n\tSee line 184?  You are using .scaling to draw the wall_co_ and thus... .moveWithCollisions isn_t_t being used during wall-drawing_co_ and thus... you have no collision checking during wall drawing.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tNow stop asking such difficult-to-answer questions and get back to work! _lt_img alt_eq__qt__dd_D_qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_biggrin.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/biggrin@2x.png 2x_qt_ width_eq__qt_20_qt_ data-emoticon_eq__qt__qt_ /_gt__lt_/p_gt_\n\n_lt_p_gt_\n\tIf you buy Deltakosh a pair of baby noise-canceling headphones and a decent home-cooked meal_co_ he MIGHT write .scaleWithCollisions() for you.  But I think he_t_d rather have one of us do it.  It won_t_t be easy.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tHere_t_s an early _qt_first step_qt_.  See line 184_co_ the line that should be .scaleWithCollisions?  ADD a line after that... like this...\n_lt_/p_gt_\n\n_lt_p_gt_\n\tmyWall.ellipsoid.x _eq_ myWall.scaling.x_sm_\n_lt_/p_gt_\n\n_lt_p_gt_\n\tThat scales the collider WITH the wall.  Now you at least have a CHANCE for a collision-while-scaling.  But really_co_ you need scaleWithCollisions()_sm_ \n_lt_/p_gt_\n\n_lt_p_gt_\n\t \n_lt_/p_gt_\n\n_lt_p_gt_\n\tSee line 185?  It is some kind of rotater.  With your new line above_co_ you made the collider the same length as the wall.  So watch out when you rotate it around_co_ or you will knock stuff off the shelves.  _lt_img alt_eq__qt__dd_)_qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ width_eq__qt_20_qt_ data-emoticon_eq__qt__qt_ /_gt_  It_t_s like trying to turn around a 4m board inside a phone booth.  Thank goodness rotateWithCollisions() hasn_t_t been coded yet_co_ eh?\n_lt_/p_gt_\n\n_lt_p_gt_\n\tBy the way_co_ if you haven_t_t noticed... .moveWithCollisions should have been named .positionWithCollisions... but wasn_t_t.  I want it changed_co_ but I suspect there will be resistance to that idea.  _dd_/  Rename it in your code... for more coding clarity.  .position_co_ .rotation_co_ .scaling... the big three!  You will need collision detecting for all three... in your project.  (be afraid)  _lt_img alt_eq__qt__dd_)_qt_ height_eq__qt_20_qt_ src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ width_eq__qt_20_qt_ data-emoticon_eq__qt__qt_ /_gt__lt_/p_gt_\n\n_lt_p_gt_\n\tIt_t_s a fun scene_co_ V.  I experimented with detaching the camera during drawing_co_ and re-attaching it after the drawing.  It works nice for setting the camera closer_co_ and with a perspective view.  You can draw walls without the camera moving all over the place while drawing. \n_lt_/p_gt_\n\n_lt_p_gt_\n\tThe scene seems boggy_co_ though.  Maybe you have too much code in your animation loop (registerBeforeRender).  But that is a different subject.  This is an interesting challenge.\n_lt_/p_gt_\n\n_lt_p_gt_\n\t_qt_Creating ground once room shape is completed_qt_ is fairly easy.  It might be easiest by doing some kind of DONE button that the user would click.  You might put it next to an EDIT button.  In DONE mode_co_ the scene is _qt_decorated_qt_ with pretty ground and wall textures_co_ etc.  In EDIT mode... the scene un-decorates and goes back to wall-drawing look.\n_lt_/p_gt_\n\n_lt_p_gt_\n\tJust some thoughts.\n_lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Dad72","Date":"2015-04-28T17:09:29Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_moveWithCollisions is not planned for what you speak Wingnut. this function makes it possible to detect the collisions during the displacement of an object/character. With this function_co_ which is a vector3 in paramettre_co_ you can enter a value of rotation_co_ scaling and position if you want it._lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Wingnut","Date":"2015-04-28T17:58:03Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_Hi d72.  Um_co_ moveWithCollisions will not work.... if there is no .position change.  If we only want to _lt_u_gt_r_lt_u_gt_otate_lt_/u_gt__lt_/u_gt_ (or scale) an object (around Y axis for example)_co_ moveWithCollisions cannot do it_co_ correct?  MoveWithCollisions MUST have .position change... to detect collision_co_ I think.  Maybe.  _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ alt_eq__qt__dd_)_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ width_eq__qt_20_qt_ height_eq__qt_20_qt__gt__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_So_co_ I think we_t_re in agreement.  scaleWithCollisions and rotateWithCollisions... are needed for detecting collisions when no change of .position is wanted.  As you stated_co_ moveWithCollisions was not designed to check for rotation and scaling collisions.  It only does .position collisions_co_ yes?  *scratch scratch*  _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ alt_eq__qt__dd_)_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ width_eq__qt_20_qt_ height_eq__qt_20_qt__gt__lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Dad72","Date":"2015-04-28T18:58:20Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_div_gt_I am not sure that the change of position either absolutly necessary_co_ this function tests the collision some or movement. rotation and the scaling are movements_co_ therefore the collision is to detect logically._lt_/div_gt__lt_br_gt_\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Kilombo","Date":"2015-04-28T19:15:45Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_movewithCollision method adds a vector3 to the existing vector3 position of the mesh and to the mesh ellipsoid. So if he wants to scale instead of translate it will be hard to use movewithCollision (i think)_co_ since there_t_s not actual movement. I have to agree with Wingy on this scalewithCollision would be cool stuff _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_biggrin.png_qt_ alt_eq__qt__dd_D_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/biggrin@2x.png 2x_qt_ width_eq__qt_20_qt_ height_eq__qt_20_qt__gt__lt_/p_gt__lt_p_gt_I played a bit with his playground demo_co_ and i don_t_t see a way to do it with movewithCollision (but i_t_m a newbie)_co_ although... there_t_s some peeps that may code a good _qt_work around_qt_. Not me for sure_co_ I_t_m still struggling with collisions also _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_wink.png_qt_ alt_eq__qt__sm_)_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/wink@2x.png 2x_qt_ width_eq__qt_20_qt_ height_eq__qt_20_qt__gt__lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"},{"Owner":"Wingnut","Date":"2015-04-29T14:34:33Z","Content":"_lt_div class_eq__qt_mages_qt__gt_\n\t\t\t\n_lt_p_gt_Yep_co_ yep_co_ yep_co_ well-pondered_co_ guys._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_Yeah_co_ dad72... good point.  (about rotate and scaling being _qt_moves_qt_)._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_So_co_ maybe the wise move... is to IMPROVE .moveWithCollisions so that it handles rotations and scalings.  Try not to break backward compat_co_ but add power to that function.  I think that would be a good idea... maybe.  _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ alt_eq__qt__dd_)_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ width_eq__qt_20_qt_ height_eq__qt_20_qt__gt__lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_I dunno.  *scratch scratch*.  I keep coming back to what Deltakosh once said.  Something like _qt_I can code BJS to generate a collision event_qt_._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_IF an event was generated_co_ it would trigger a func called .onCollision(eventObj).  It would then be the project coder_t_s problem to figure out if it is a rotation_co_ position_co_ or scaling collision.  Some folks would not use .moveWithCollisions_co_ and instead use simple .translate()_co_ and rotate()_co_ and scale()_co_ if wanted. _lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_If any object in the scene with .checkCollisions _eq_ true... collided... then .onCollision() would be called (with an event object to get collision info from)._lt_/p_gt__lt_p_gt_ _lt_/p_gt__lt_p_gt_Just thinkin_t_.  _lt_img src_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/default_smile.png_qt_ alt_eq__qt__dd_)_qt_ srcset_eq__qt_http_dd_//www.html5gamedevs.com/uploads/emoticons/smile@2x.png 2x_qt_ width_eq__qt_20_qt_ height_eq__qt_20_qt__gt__lt_/p_gt_\n\n\n\t\t\t\n\t\t_lt_/div_gt_\n\n\t\t_lt_div class_eq__qt_ipsI_qt__gt__lt_/div_gt__lt_/div_gt_"}]