- Home /
Walking in A Inner Sphere ?,Inner Sphere Walk
Hi,
I want to make a player walk inside a sphere. My question is what kind of direction I have to aim to solve the problem to create an inner sphere mesh collider that the player can walk comfortably. I did an inverted mesh in Zbrush divide it into two, and it is a real low poly mesh to make it easier for mesh collider to calculate. It didn't work when I use mesh collider; it closes the top of my hemisphere. I am planning to create a panel by panel a sphere and for each panel to create another collider. Still, it is the least preferable case as anyone can imagine. What road should I have to take to make it easy and applicable to future projects?
Thanks A Lot!,Hi,
I want to make a player walk inside a sphere. My question is what kind of direction I have to aim to solve the problem to create an inner sphere mesh collider that the player can walk comfortably. I did an inverted mesh in Zbrush divide it into two, and it is a real low poly mesh to make it easier for mesh collider to calculate. It didn't work when I use mesh collider; it closes the top of my hemisphere. I am planning to create a panel by panel a sphere. And for each panel to create another collider. Still, it is the least preferable case as anybody can imagine. What road should I have to take to make it easy and applicable to future projects?
Thanks A lot!
Inverting normal is a option? Because walk on earth scripts are not functioning if the meshes are inverted. I am not a coder I try to grasp some sense while watching tutorials but couldn't understand why I stuck in this so bad. One month ago it was somehow(badly) functioning a inner shelled sphere with this plane tutorial codes (not exactly but at least with a came upside down it did work) Now I lost a bit direction. Script writing is only the way I guess which I have no idea how to do that...
Answer by suIly · Nov 25, 2019 at 01:59 PM
You can try adding an edge collider, and to move the points around the outline of the circle
Answer by Kishotta · Nov 25, 2019 at 06:01 PM
A couple of thoughts here:
If your player needs to walk on the inside of a perfectly smooth sphere (that is, there are no bumps or "hills") you can fake walking by rotating your player around the center of sphere. No colliders required.
If your player needs to conform to the inside surface of an irregular shape you can follow the same steps you would take for walking along the exterior surface (raycasting from some height above the surface) but instead of placing the player at the contact position facing outwards (
hit.normal
), have them face inwards(-hit.normal
).
Your answer
Follow this Question
Related Questions
Is it new in Unity? Collider exception . . . 1 Answer
How to add mesh collider into terrain-trees? 1 Answer
How to correct add collider to every child of gameobject? 1 Answer
How can I do drilling using mesh colliders 0 Answers
Is there any way to get the optimized (cooked) mesh of a mesh collider? 0 Answers