Creating the curve that attach on the sphere - unity3d

I want to creat a curve line that attach on the sphere, Because i want to track the line on curve line.And the sphere has a force haptic on it.
I try to make a cylinder and scale it.But there is no way to make it attach on sphere.
I only have force haptic on sphere that my pen can touch it.

Related

How to make Sphere Mask follow the parent?

I'm making a bubble shield. I use the Sphere Mask in Shader Graph to make a collision effect (the Sphere Mask uses global position as Coords). But if I move the shield, the Sphere Mask will be in the same world place, so the collision effect won't work properly. How can I make the Center property follow the parent?
I'm using this to set the Center:
vfx.SetVector3("SphereCenter", collider.ClosestPoint(transform.position));

Ball moving in tube with rigidbody

Lets say you have a sphere(rigidbody, sphere collider) inside a tube(mesh collider). I want a ball to move in the direction of tube always by applying force on rigidbody.
My purpose is to simulate the circular gravity, so that ball can fall down back obviously in circular motion. This was the approch i was using to simulate fake circular gravity.
How can I check which direction of force has to be applied to continue motion following the path of the tube with addforce?
try applying physics material to your tube to control the ball reaction to the surface of the tube.

How to flip the normals of the collider mesh in Unity

I have a sphere in Unity and have used a script to flip the normals so I can see a 360 texture on the inside. I'm doing this because eventually I want to play a video on the inside, and also have other spheres inside hat can be thrown around and bounce off the inside walls of the outer sphere. The problem is, despite the normals of the sphere facing inwards, the collision is still standard. Objects within the sphere just fall straight through.
Do I need to add to my script to include the collision mesh?
you cannot have non-convex MeshColliders behave as Rigidbodies in Unity, you need to fake the walls as a series of convex colliders, approximate with box colliders maybe?

unity slide sphere on a slope without rotating

I have a ramp and I move a sphere with arrows. I have unity's gravity and I want the rigid body of sphere to slide when it is stoped at the top of the ramp but without rotating it's body. The problem is if I Freeze rotation on x axis, it won't slide.
Try to use physics materials like ice and freeze rotations.
See info about materials here. "Like ice" means than you need set frictions to zero.
You should create a new Physical Material and set both dynamic and static friction to 0. Then drag it to the sphere and maybe also to the ramp.
Test with both rotation constrained and not.

How can I make custom 2D polygon in Unity with collision detection?

I am learning Unity and I want to make a little game where the user controls a tank and she can shot with it. My plan is when the missile hit the terrain, it makes a hole in that, like in the old school Worms. My first idea was to make the terrain as a textured polygon and when a collision happens, change the polygon structure. Is it possible to implement this?
You can do a little trick with a 3D mesh. If you are using orthogonal camera the Z axis won't be visible and you will be able to add mesh collider. If you still want to do custom things with that mesh like changing shape there are assets on the store:
http://u3d.as/content/chris-west/mega-fiers/1Qa
Or
When a missle hits terrain change you terrain texture pixels alpha channel to 0
http://docs.unity3d.com/ScriptReference/Texture2D.SetPixels.html
Then use raycasts to check if alpha channel != 0 for moving.