- This topic has 5 replies, 2 voices, and was last updated 5 years ago by
GLiFTeK.
-
AuthorPosts
-
2021-01-21 at 9:24 am #37602
PetroCustomerI am not sure if I should use physics module, or play without it in order to have control over few cubes which I drag and arrange in a room. I did not found a simple dragging physics objects example but without physics I already managed to drag objects…
Not sure how to know when should stop dragging in order to not drag through other objects. Maybe to keep a dictionary with x, y, z position of objects or I should better investigate with physics ?2021-01-21 at 1:33 pm #37613
PetroCustomerI get X position for an object and is it output as -0 instead of expecting 0. This look strange for me. Any hint please ?
2021-01-21 at 11:25 pm #37626
GLiFTeKCustomerHi,
You can look into applying a Box3 to your object(s) and see if they intersect.I have a custom puzzle for that.
I will be premiering soon if you can wait.
I’ll let you know!
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature!2021-01-22 at 2:55 pm #37646
PetroCustomerAs I drag objects on xy I did calculate for now, the x,y coords for each box corner and compared based on 3D Collision Detection … however something is not perfect and I get a console print “Collision detected with object …” but if I continue dragging “stronger” I get over the “barrier”. Any ideea how to stop dragging somehow… any trick ? I now restore the x,y for the dragged object to initial state…
2021-01-22 at 6:27 pm #37652
PetroCustomerI did it in a function GlifTek which I call in the puzzles. Not know how to make yet a puzzle from it but it works… I will need to cleanup my code :) Took all [[x,y]… 4 corners and compared :) Thx for opening my eyes
2021-01-23 at 1:04 am #37658
GLiFTeKCustomerYou can circumvent all that extra code with Box3. It creates an AABB for you.
You’d use intersectsBoxBut if you got something else working then awesome! Don’t need to fix what is not broken!
Visit the GLIFTEK Verge3D Plugins Store!
GLIFTEK.com for Plugin Documentation & LIVE DEMOS!
LIKE The GLIFTEK Facebook Page for updates!
Join the Verge 3D Discord Server!
plz share Discord link & on your signature! -
AuthorPosts
- You must be logged in to reply to this topic.
