- Home /
I want to be inside a spherical collider.
Hello, I have a project that the player is inside a spherical environment. A ball with in a ball. The inside ball rolls around inside the bigger ball, i. e. sphere within a sphere. The first question is 'Is this capable in Unity and if so how would I devise a rigidbody' and then the second part is about 'the collider setup itself'? I already have the concept of building the sphere from plates but that would very tedious. This solution has been haunting me for months. Thank you in advance.
Hello,
Is the player prefab is the sphere inside? if yes, it depends. do you want the player camera to be inside or outside the big sphere? if inside you can, but when the camera is inside, you can not see the big sphere you are in, you as if it is invisible(just it's shadow is visible). You can also try to add an effect to the camera if it will serve your goal. If outside, you can not do it with unity sphere, because you can't see what's inside of it.
However you may find something in the asset store.
Answer by FrZn · Oct 22, 2018 at 11:03 PM
You could use blender to create a sphere and then flip the normals in blender, so the faces are facing inwards. Then just add a mesh collider to the big sphere and you have your game environment. If you want to rotate the big sphere in the game, just attach a rigidbody and use rigidbody.RotatePosition() to rotate it. You will also want to make it a kinematic rigidbody, so it can only be moved and rotated by script. The smaller ball would also have to have a rigidbody attached for it to be able to be moved by the physics system.
I used Wings3d. Really sweet progress made. Thank you to all. $$anonymous$$ay the rigidbody force be with you all!
Answer by triangle4studios · Dec 10, 2020 at 07:36 PM
INVERTED COLLIDER
TLDR: Invert the normals of a sphere in blender etc, and apply a mesh collider in unity.
Create a sphere in blender
Edit Mode
Ctrl A
Mesh->normals->recalculate inside
Object Mode
Select Sphere
File->export ->FBX
Selected objects only, not collections
Select only the "mesh" option
Select Apply transform(Experimental)
Save it
Import into unity by dragging and dropping the fbx file you saved into file browser
Apply mesh collider
Done
Answer by bgprocks · Oct 22, 2018 at 09:30 PM
Not sure, but did you try creating the outer sphere in a modeling app, then import it, use a mesh collider and a double sided material. Just thinking this might work.
Answer by giantkilleroverunity3d · Oct 22, 2018 at 08:26 PM
@II_Spoon_II Yes the player is inside and the camera follows it. I want to have a mesh inside also but I can easily add that to the outside and see it from the inside. The outer sphere acts as a spherical boundary for the inner player sphere. The player rolls around in side.
Your answer
![](https://koobas.hobune.stream/wayback/20220612180750im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Sphere Collider doesn't move after collision with Character Controller 1 Answer
Marking trail of sphere on mesh 0 Answers
put blanket on the ground 2 Answers
Golfball sphere collider "Hops" over vertex-joined planes at intersection? 1 Answer
Check whether objects are within a sphere of influence 0 Answers