Home › Forums › General Questions › Please help–Cannot remove loaded GLTF After moving them
- This topic has 12 replies, 3 voices, and was last updated 9 hours, 26 minutes ago by kdv.
-
AuthorPosts
-
2024-10-31 at 4:13 am #78332MicdsnCustomer
I have a scene I use in VR where I load several GLTF fliles when a button is clicked on in the scene. If I dont ‘grab’ the imported models they will be removed at a second pressing of the button as the puzzle indicates, however if I pick up and move them, the second button press loads another instance of the model. What am i doing wrong?
(If you’re wondering why the two groups–the puzzle has 2 types of objects I want to interact with in the scene–‘slidable’ and ‘pickable’. I want some objects to be able to be moved, and some to be moved but ‘stick’ to the floor )
Attachments:
You must be logged in to view attached files.2024-10-31 at 12:30 pm #78350Yuri KovelenovStaff2024-10-31 at 2:08 pm #78354kdvParticipantWhat am i doing wrong?
your grabbed objects are parented to the main scene after releasing and already aren’t children of the appended scenes. thus they won’t be removed when you remove those appended scenes.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-10-31 at 2:35 pm #78356MicdsnCustomerThank you kdv! is there a way to delete the imported models another way? Or should i parent to an empty when released? Any suggestions to fix?
2024-10-31 at 2:37 pm #78357kdvParticipantJust remove parenting.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-10-31 at 4:04 pm #78364MicdsnCustomerI tried this–parenting is how the controller ‘grabs’ object. Is there a way to parent it back to the main scene without sticking to anything else in the scene?
2024-10-31 at 4:09 pm #78365kdvParticipantIs there a way to parent it back to the main scene
they are already parented to the main scene. objects will be parented to
Scene
if you leave the second argument empty. But initially (before grabbing) they were parented toDisplay1
.Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-10-31 at 4:52 pm #78366MicdsnCustomeron ‘squeezeend’ I already parent it to an empty second argument. Is it possible to parent the picked object back to itself?
I’m thinking of giving up ‘removing’ the appended model and just hiding it. But if I cant call the object back by it’s alias to remove that might not be possible either.
To clarify–all i want to do now is just remove the object I loaded with the first click of the button. I used ‘append scene’ puzzle with an alias but I cannot ‘remove object’ on this alias if I have moved it at all with the controllers. — Everything works perfect if I dont touch the object at all with the controllers
2024-10-31 at 5:23 pm #78370kdvParticipanton ‘squeezeend’ I already parent it to an empty second argument
and that’s the main question: why instead of parenting back to
Display1
you’re parenting your objects to the main scene? The second argument empty =Scene
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-10-31 at 5:38 pm #78372MicdsnCustomerI’ll have to figure out how to do it. There are a possible 3 different models that are able to be picked up. Trying to figure how to avoid excess drawn out logic to handle all 3 just to unparent from the controller.
2024-10-31 at 6:02 pm #78373kdvParticipantI’ll have to figure out how to do it
put them back from where you took them
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2024-10-31 at 6:10 pm #78376MicdsnCustomerBut there are 3 possible displays — how do i put logic for this in the grabbing?
2024-10-31 at 6:12 pm #78377kdvParticipantremember from where you took objects. use some variable (a dictionary) to save initial parent objects for picked objects.
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
-
AuthorPosts
- You must be logged in to reply to this topic.