|
I'm building collision around my render geometry using mostly Cube game objects. In order to work with them easily in the editor (I'm using Unity 1.5 for iPhone), I have the Mesh Renderer for each one enabled so I can see them. But when in the engine, I only want them to collide but not render. I've thought of writing a script that turns off rendering for all objects tagged "collide", but that feels a bit clunky to me and might give me a little hiccup as the level loads (just guessing). Has anyone come up with a good workflow for working with visible collision in the editor but have it invisible in the game?
(comments are locked)
|
|
Put all of the collision geometry on a separate layer, go to your Camera, where it says Culling mask, click on Everything and uncheck the layer that your collision geometry is on. That's brilliant! Thanks!
Dec 10 '09 at 11:03 PM
rocket5tim
Great solution; I'd vote it up if I could.
Apr 03 '12 at 02:53 AM
RustyTheBoyRobot
(comments are locked)
|
|
I've taken to designing my colliders in Blender, using meshes, and converting the meshes to colliders upon import. This is part of a larger scheme, in which I do all my level editing externally, and then sync with FBX files. It's kind of like this, only it allows for mesh editing instead of just scaling a unit primitive. (This example doesn't really provide support for capsule colliders, but mine works fine with those.) Let me know if you're interested. I'm going to release my solution to the wiki after I finish putting it through its paces on my current game. I'm still adding features and cleaning it up, but it does work. Looks like a good solution Jessy, thanks for the link.
Dec 11 '09 at 01:54 PM
davebuchhofer
I'm using a later version of this, but feel free to try it and/or modify it to your liking until I make the wiki entry.
Dec 11 '09 at 11:05 PM
Jessy
(comments are locked)
|
