- Home /
Rotating friction problem - Nothing works!
Hi,
my problem is similar to this one: http://answers.unity3d.com/questions/121833/Friction-issue-with-rotating-sphere.html. But for me, the solution doesn't work.
My setup is a bit different: I have a flat cylinder with its plane side in y-direction. A road on both sides fits closely so that a car with wheelcolliders should drive over the cylinder. I want the cylinder to rotate and affect the car (drift away a bit or so). The Problem is that I can't achieve the wished effect:
Rotate the transform without rigidbody: http://www.imagebanana.com/view/p58wn8n7/WithoutRB.jpg - nothing happend
Apply a rigidbody and set to 'isKinematic' didn't work either
unselect 'isKinematic' but set all constrains but y rotation and apply angularvelocity every frame: http://www.imagebanana.com/view/yfp815m5/WithRB.jpg - car is flipping like crazy when it touches the surface of the cylinder (no, the velocity isn't to strong)
The problem could be the meshcolliders attached to both the road and the cylinder. The rotation is quite shaky and sometimes even in the wrong direction, but I set a really low velocity. When I set the cylinders meshcollider to 'convex' it comes even stranger.
I read that there are problems with two meshcolliders colling with each other, but what should I do in my setup? Unfortunately, there is no cylinder-collider :( Any suggestions? The only idea I have at this point would be a cosmetic rotation, but write a script to apply forces to the car according to its position on the cylinder.
Well, I actually named it "turntable" in the Editor ;). Ok, my car has a low poly version of it self a a mesh-collider because it's hard to fit box colliders to those sportcars (have a Lamborghini too), maybe I could try again with box-colliders, but the real problem is, that the turntable don't rotate well, when I attach a rigidbody to it, so it seems somehow it doesn't really fit in the street and makes choppy rotation, even I made the hole in the street bigger.
Here's a screenshot: edit: upload function seems buggy, can't hit "accept" or "cancel", theres just a picture preview in front of all.
just uploaded the screenshot somewhere else: http://www.imagebanana.com/view/4w7xk27c/HoleScene.jpg
Ah, my fault with the shoppy rotation: I had a collider on the small cylinder in the middle, it blocked the turntable. Now the rotation is smooth, but the car's falling through the turntable, whether convex or concave setting on its meshcollider oO!
Is there actually really no way of implementing a cylinder-collider? It's just so mandatory when you think on primitives.
I deleted the meshcolliders on my cars and add some boxcolliders, but doesn't work either. I'm going to just delete the turntable, maybe replace it with something cooler ;) Thanks anyway.
Your answer
Follow this Question
Related Questions
How can I rotate a player proportionally over a mesh? 1 Answer
adding sphere colider rotation movment changed 2 Answers
Rotation and friction between objects (ball and flat service) 0 Answers
Rotating a MeshCollider 0 Answers
How to rotate collider? 1 Answer