1
$\begingroup$

I know how to add an object from another layer into main scene, but how can I do it for a group of objects: Here's my blend file https://www.dropbox.com/s/41o9arxmbohsva7/temp.blend?dl=0

What I am trying to do is that as soon as the cubes collide (controls are UP/DOWN/LEFT/RIGHT), I want the original cube to be removed(which already works) and replaced with the group of objects from layer 2 (brokenCube). The brokenCube is created using cell fracture.

To sum it up, I need to replace Object cube with group brokenCube on collision with player object

EDIT: Here's the new blend where I was trying to implement the idea. It's slightly complicated, but the building should break when the dragon hits it. (Which it will, just don't press any keyboard buttons)

The endObject() seems to be working, but the added object's does not show up at the correct location and defaults to the player_location. (instead of using the collision calling object)

https://www.dropbox.com/s/2guepbfyq6h4tsm/dragon.blend?dl=0

$\endgroup$
1
$\begingroup$

If you create an empty, and set it to represent an instance of the brokenCube group (Properties panel -> Object -> Duplication -> Group), you can then simply add that empty, to add all the objects in the group.

Demo: break_demo.blend

PS: Cell fracture seems to create areas with a very large number of very small parts. I would recommend that you remove most of them (as I did in the demo), if you want to have good performance.

$\endgroup$
  • $\begingroup$ I tried doing the same thing on a larger project and that does not seem to work, can you please help. I have added the new blend location on the question $\endgroup$ – chettyharish Oct 24 '14 at 7:28
  • $\begingroup$ @chettyharish A new problem should be addressed in a new question; I think it's pretty rude to expand the scope of the question, and then reject the previously accepted answer because it doesn't address new issues you encountered. $\endgroup$ – Goran Milovanovic Oct 24 '14 at 13:36
  • $\begingroup$ I am sorry about that, I thought that's the way to get attention of the answerer. $\endgroup$ – chettyharish Oct 24 '14 at 23:33
  • $\begingroup$ Can you still help me with the question please $\endgroup$ – chettyharish Oct 24 '14 at 23:33
  • $\begingroup$ @chettyharish As I said: A new problem should be addressed in a new question. Make a new question; if I can answer it, I will, and if not, perhaps someone else will be able to help you. Tip: You should aim to simplify things as much as possible, so instead of having to wait for some object to hit something, you should just map the relevant action to a keyboard key (like space). Also, unless complicated objects/assets like "dragon" are truly necessary to show the nature of the problem, they should be removed, or replaced with simple primitives. $\endgroup$ – Goran Milovanovic Oct 25 '14 at 10:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.