Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Platform Glitching

Discussion in 'Physics' started by Pixellate32, Mar 27, 2020.

  1. Pixellate32

    Pixellate32

    Joined:
    Mar 22, 2020
    Posts:
    6
    Hey,I am creating endless game in which ball is rolling.I created an infinite platform spawning script.As shown in picture 10 tiles spawn everytime but after these 10 tiles when another tile spawn the Ball(player) collide with it and make him jump or move him up from the ground like when it hit with a small thing.The ball is using the rigid body and platform is using box collider.
     

    Attached Files:

  2. Sciirof

    Sciirof

    Joined:
    Apr 5, 2013
    Posts:
    14
    I think the issue causing this might be a tiny or non visible gap between your platforms.
    you could try making a box collider in an empty game object and removing the box collider from the platforms.
     
  3. Pixellate32

    Pixellate32

    Joined:
    Mar 22, 2020
    Posts:
    6
    Thanks for the reply I added a box collider to an empty object but it has the same problem.I unchecked the gravity from rigid body of ball and it was not doing that anymore but without gravity I can't get that spinning effect.I wrote a simple script which rotate it,but it was only in forward direction.I want it to rotate according the key pressed,like with left it should rotate 45 degree to left and vice versa.