|
I intend to develop an excavator game. Excavator modeling based on cinema4d (trial version) I try to define the soil as lots of small cubes (rigid bodys with box colliders), also i add the box collider to the shovel of the excavator. But they two can't collide with each other when the small cubes are defined to be very small and with big weight.
(comments are locked)
|
|
Having lots of small cubes simulating dirt appears to me to maybe not be a good plan. As Dwair pointed out, having many small colliders can be quite a nightmare for the physics engine. You could consider having a mesh for the excavation site and procedurally modifying the mesh when the player digs. It will probably take a lot of tweaking to get right though.
(comments are locked)
|
|
Did you put rigidbody component to the shovel too? It is very important both phys colliders have mass, if you don't want the shovel to bounce or make funny movements, just use isKinematic and there you go! The other part about "Small colliders" worries me most, small colliders are a headache for any physics engine, the only thing I can think of is modifying physics settings: You'll probably need to reduce min penetration for penalty and increment solver iteration count... Another useful thing if colliders are moving fast is DontGoThroughThings Anyway, interesting game you are making! I did not put rigidbody component to the shovel. I tried but it fell apart from the excavator and made funny movements when i drove my excavator (i attached First Person Controller to the Cab of excacvator, both were attached box colliders but not rigid bodies).
Apr 13 '10 at 01:16 PM
Roy
(comments are locked)
|
|
Why do they need to collide with each other? Can't you just make the shovel tool follow the mouse cursor and use OnMouseDown() of the soil-cube to determine which cube to scale? The thing is actually like this: when the shovel digs into the soil (rigidbodies + box colliders), soil must stay at the concave of the shovel by gravity; when the shovel is upside down, the soil must be poured out. So what can i do? Will OnMouseDown() help ?
Apr 12 '10 at 10:28 AM
Roy
(comments are locked)
|
|
I have made an excavator using only rigid bodies and I can pick up thing fine with the bucket, http://www.fabrejean.net/projects/excavator for forum entries: http://forum.unity3d.com/threads/66871-Excavator-simulation in french: http://www.unity3d-france.com/unity/phpBB3/viewtopic.php?f=12&t=1016 if you need help with your build, let me know. the picking things was not the hard part, the rigging of the arms was for a totally predictable, stable and reliable rig. basically the big trick is to increase the solver Iteration count and adapt the time settings. Otherwise, joints are not tight and it becomes utterly unstable. My demo has quite large objects to pick up, but I tried with smallers during build phase and it can handle it fine. Bye, Jean
(comments are locked)
|
