- Home /
How to texture the inside of a sphere (or cylinder or cube)
I might be extremely dumb but I still don't grasp how I can apply a texture inside a shape in Unity3D. Same, I want to have a collider INSIDE the object AND outside the object. If only I could find how to do this !
Someone answers very laconically on the forum about normal... But no specification.
Imagine a city under a dome. I want to be able to see the dome from inside (I am presently using particles but it is not satisfying) and outside. I would like to have a collider at least inside the dome (to avoid going out of the place).
If it is not possible for a shape to have 2 of these properties simultaneously, no pb, I will use 2 shapes with one slightly smaller for the inside. But how to affect texture and collider INSIDE. I am sure the answer might be very simple.
Answer by azzogat · Nov 27, 2010 at 04:12 PM
As Eric5h5 said, just model your dome and in whatever software you use apply a Normals modifier and flip the normals.
You could also just use a cubemap for the background image and create a custom mesh for the collisions.
This is what I don't get. Do I need to pass to Blender or whatever just to model a sphere ?
Answer by oliver-jones · Nov 26, 2010 at 05:00 PM
Not sure about the textures - but I know how to have two colliders, one inside and one outside.
Okay, So you have your sphere, already with a sphere collider right? This will be the outer collider, so make it bigger than it already is. Next, create a game empty, and drag this into your sphere (so its a child). Change the position of the empty to 0, 0, 0 in the Inspector, then add a sphere collider to this: Component > Physics > Sphere collider, and make the radius of this smaller (inside collider).
Hope that helps.
That's, I already understand how to do it. What I don't get is how to change the normals. I am used to PovRay / $$anonymous$$oray and it was much simpler.
Answer by Eric5h5 · Nov 26, 2010 at 06:15 PM
Yes, it's very simple...just model both the inside and outside.
Your answer
![](https://koobas.hobune.stream/wayback/20220613084632im_/https://answers.unity.com/themes/thub/images/avi.jpg)