'Is there a way to precalculate a scene in Unity with physics, such that the final product is just a normal static scene?
I'm working on making a simple game in Unity, and am a complete beginner. I might be asking the question wrong, so I don't know if it was already asked but here is what I'm trying to do:
I have a lot of pieces that I want to look like they were simply thrown in a pile. I can't really make it myself by hand as it doesn't look good, so is there a way to place a lot of them in the air, activate physics, simulate a natural pile, and then save those locations as part of the scene?
On top of that, is it possible to do the same with animations and same the whole falling animation?
I can use blender as well, as I made the geometries I'm working with in blender
Solution 1:[1]
You could add rigidbodies to those objects, run the game once to see where they will end up stopping, and then manually set the Transform of each component to what it was after the fall after exiting play-mode
Solution 2:[2]
In addition to Sven Marnach's variants, we can also do just
let cloned_casted: Arc<dyn Fruit> = pear.clone();
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kitsomo |
| Solution 2 | ars |
