Hi people.. I'm having some problems with physics, my character keeps passing through moving floors/objects.
This (poorly) animation is what I expect:

As you can see in the animation above, the character keeps nice on the floor. Now the reality is this (not animation, used unity): 
Here we have two problems:
1. The character is moving to both sides (and jumping), shouldn happen, since the floor where he is standing is not rotating.
2. The character gets into the floor, sometimes he pass through the floor completely. If I increase the velocity of the rotation, it's almost impossible to make the character stand on the ground.
This is a prototype (thats why the sprites are sh**y). **Code - Rotator.cs** public class Rotator : MonoBehaviour { public float DegreesPerSecond = 80.0f; void Update () { transform.Rotate(new Vector3(0, 0, Time.deltaTime * DegreesPerSecond)); // The grund where the player will stand... Transform block = transform.FindChild("Block"); if (block != null) { block.localRotation = Quaternion.Euler(-transform.rotation.eulerAngles); } } } **Structure** ![alt text][1] The rotator is using Polygon Collider, but that Block child (where the player will be) is using Box Collider 2D. Tried to switch from Polygon to Box Collider and still same issues.
I think the player script is irrelevant, since I'm only moving the player to prevent him fall off the screen. I can disable the player script, the issues listed above will happen, the difference is that the character will fall off, so I don't think the player script is the problem.
I bet that this will happen on every moving object/ground, so, there's a way to fix this? PS. Newbie on unity and game developing.
PS²: English is not my native language.
PS³: Using Unity 5.3 x64. [1]: /storage/temp/75153-structure.png
As you can see in the animation above, the character keeps nice on the floor. Now the reality is this (not animation, used unity): 
Here we have two problems:
1. The character is moving to both sides (and jumping), shouldn happen, since the floor where he is standing is not rotating.
2. The character gets into the floor, sometimes he pass through the floor completely. If I increase the velocity of the rotation, it's almost impossible to make the character stand on the ground.
This is a prototype (thats why the sprites are sh**y). **Code - Rotator.cs** public class Rotator : MonoBehaviour { public float DegreesPerSecond = 80.0f; void Update () { transform.Rotate(new Vector3(0, 0, Time.deltaTime * DegreesPerSecond)); // The grund where the player will stand... Transform block = transform.FindChild("Block"); if (block != null) { block.localRotation = Quaternion.Euler(-transform.rotation.eulerAngles); } } } **Structure** ![alt text][1] The rotator is using Polygon Collider, but that Block child (where the player will be) is using Box Collider 2D. Tried to switch from Polygon to Box Collider and still same issues.
I think the player script is irrelevant, since I'm only moving the player to prevent him fall off the screen. I can disable the player script, the issues listed above will happen, the difference is that the character will fall off, so I don't think the player script is the problem.
I bet that this will happen on every moving object/ground, so, there's a way to fix this? PS. Newbie on unity and game developing.
PS²: English is not my native language.
PS³: Using Unity 5.3 x64. [1]: /storage/temp/75153-structure.png