Unity object going through wall










0















What I've tried and checked:



  1. Object has a non-trigger sphere collider

  2. Object has RigidBody

  3. Object has very low mass

  4. Object is using Continuous Collision Detection

  5. I am adding a low force to the RigidBody at Start, not Update, instead of manually moving every frame

  6. Wall has a non-trigger box collider

  7. Wall has RigidBody

  8. Wall is using Continuous Collision Detection

Some other things to note that I don't think the matter is that the object's parent also has a RigidBody.



Before this, I was using a RayCast to move it out of the ground, but that was causing bugs when it went over inclines, and I would really like it to just work, but for some reason, the ball just goes through inclines, instead of going up them, even after everything else I've tried.










share|improve this question
























  • Is it possible that your sphere of your sphere collider is just not exact enough?

    – NtFreX
    Nov 13 '18 at 8:24











  • I don't think so. At this point, I got it to move using AddForce every frame, and it hits walls, but it stops on the way up inclines, and I don't know why. I tried rotating the vector that's adding the force, but that didn't go the way I thought.

    – AustinWBryan
    Nov 13 '18 at 8:35











  • Maybe are you in the case in which the wall is thin and the sphere is moving too fast?

    – Andrea
    Nov 13 '18 at 9:49











  • How about Collision Layers?

    – Morasiu
    Nov 13 '18 at 10:12












  • Posting some code could be really helpful. Also, are you manually telling the ball to ignore certain layers?

    – Immorality
    Nov 13 '18 at 14:15















0















What I've tried and checked:



  1. Object has a non-trigger sphere collider

  2. Object has RigidBody

  3. Object has very low mass

  4. Object is using Continuous Collision Detection

  5. I am adding a low force to the RigidBody at Start, not Update, instead of manually moving every frame

  6. Wall has a non-trigger box collider

  7. Wall has RigidBody

  8. Wall is using Continuous Collision Detection

Some other things to note that I don't think the matter is that the object's parent also has a RigidBody.



Before this, I was using a RayCast to move it out of the ground, but that was causing bugs when it went over inclines, and I would really like it to just work, but for some reason, the ball just goes through inclines, instead of going up them, even after everything else I've tried.










share|improve this question
























  • Is it possible that your sphere of your sphere collider is just not exact enough?

    – NtFreX
    Nov 13 '18 at 8:24











  • I don't think so. At this point, I got it to move using AddForce every frame, and it hits walls, but it stops on the way up inclines, and I don't know why. I tried rotating the vector that's adding the force, but that didn't go the way I thought.

    – AustinWBryan
    Nov 13 '18 at 8:35











  • Maybe are you in the case in which the wall is thin and the sphere is moving too fast?

    – Andrea
    Nov 13 '18 at 9:49











  • How about Collision Layers?

    – Morasiu
    Nov 13 '18 at 10:12












  • Posting some code could be really helpful. Also, are you manually telling the ball to ignore certain layers?

    – Immorality
    Nov 13 '18 at 14:15













0












0








0








What I've tried and checked:



  1. Object has a non-trigger sphere collider

  2. Object has RigidBody

  3. Object has very low mass

  4. Object is using Continuous Collision Detection

  5. I am adding a low force to the RigidBody at Start, not Update, instead of manually moving every frame

  6. Wall has a non-trigger box collider

  7. Wall has RigidBody

  8. Wall is using Continuous Collision Detection

Some other things to note that I don't think the matter is that the object's parent also has a RigidBody.



Before this, I was using a RayCast to move it out of the ground, but that was causing bugs when it went over inclines, and I would really like it to just work, but for some reason, the ball just goes through inclines, instead of going up them, even after everything else I've tried.










share|improve this question
















What I've tried and checked:



  1. Object has a non-trigger sphere collider

  2. Object has RigidBody

  3. Object has very low mass

  4. Object is using Continuous Collision Detection

  5. I am adding a low force to the RigidBody at Start, not Update, instead of manually moving every frame

  6. Wall has a non-trigger box collider

  7. Wall has RigidBody

  8. Wall is using Continuous Collision Detection

Some other things to note that I don't think the matter is that the object's parent also has a RigidBody.



Before this, I was using a RayCast to move it out of the ground, but that was causing bugs when it went over inclines, and I would really like it to just work, but for some reason, the ball just goes through inclines, instead of going up them, even after everything else I've tried.







c# unity3d physics






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 13 '18 at 7:22









Elham Esmaeeli

798




798










asked Nov 13 '18 at 7:15









AustinWBryanAustinWBryan

2,33621332




2,33621332












  • Is it possible that your sphere of your sphere collider is just not exact enough?

    – NtFreX
    Nov 13 '18 at 8:24











  • I don't think so. At this point, I got it to move using AddForce every frame, and it hits walls, but it stops on the way up inclines, and I don't know why. I tried rotating the vector that's adding the force, but that didn't go the way I thought.

    – AustinWBryan
    Nov 13 '18 at 8:35











  • Maybe are you in the case in which the wall is thin and the sphere is moving too fast?

    – Andrea
    Nov 13 '18 at 9:49











  • How about Collision Layers?

    – Morasiu
    Nov 13 '18 at 10:12












  • Posting some code could be really helpful. Also, are you manually telling the ball to ignore certain layers?

    – Immorality
    Nov 13 '18 at 14:15

















  • Is it possible that your sphere of your sphere collider is just not exact enough?

    – NtFreX
    Nov 13 '18 at 8:24











  • I don't think so. At this point, I got it to move using AddForce every frame, and it hits walls, but it stops on the way up inclines, and I don't know why. I tried rotating the vector that's adding the force, but that didn't go the way I thought.

    – AustinWBryan
    Nov 13 '18 at 8:35











  • Maybe are you in the case in which the wall is thin and the sphere is moving too fast?

    – Andrea
    Nov 13 '18 at 9:49











  • How about Collision Layers?

    – Morasiu
    Nov 13 '18 at 10:12












  • Posting some code could be really helpful. Also, are you manually telling the ball to ignore certain layers?

    – Immorality
    Nov 13 '18 at 14:15
















Is it possible that your sphere of your sphere collider is just not exact enough?

– NtFreX
Nov 13 '18 at 8:24





Is it possible that your sphere of your sphere collider is just not exact enough?

– NtFreX
Nov 13 '18 at 8:24













I don't think so. At this point, I got it to move using AddForce every frame, and it hits walls, but it stops on the way up inclines, and I don't know why. I tried rotating the vector that's adding the force, but that didn't go the way I thought.

– AustinWBryan
Nov 13 '18 at 8:35





I don't think so. At this point, I got it to move using AddForce every frame, and it hits walls, but it stops on the way up inclines, and I don't know why. I tried rotating the vector that's adding the force, but that didn't go the way I thought.

– AustinWBryan
Nov 13 '18 at 8:35













Maybe are you in the case in which the wall is thin and the sphere is moving too fast?

– Andrea
Nov 13 '18 at 9:49





Maybe are you in the case in which the wall is thin and the sphere is moving too fast?

– Andrea
Nov 13 '18 at 9:49













How about Collision Layers?

– Morasiu
Nov 13 '18 at 10:12






How about Collision Layers?

– Morasiu
Nov 13 '18 at 10:12














Posting some code could be really helpful. Also, are you manually telling the ball to ignore certain layers?

– Immorality
Nov 13 '18 at 14:15





Posting some code could be really helpful. Also, are you manually telling the ball to ignore certain layers?

– Immorality
Nov 13 '18 at 14:15












1 Answer
1






active

oldest

votes


















1














~Try this:
in Rigidbody properties, try to change Collision Detection to Continuous instead of discrete. Let me know if that helps.






share|improve this answer






















    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53275713%2funity-object-going-through-wall%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    ~Try this:
    in Rigidbody properties, try to change Collision Detection to Continuous instead of discrete. Let me know if that helps.






    share|improve this answer



























      1














      ~Try this:
      in Rigidbody properties, try to change Collision Detection to Continuous instead of discrete. Let me know if that helps.






      share|improve this answer

























        1












        1








        1







        ~Try this:
        in Rigidbody properties, try to change Collision Detection to Continuous instead of discrete. Let me know if that helps.






        share|improve this answer













        ~Try this:
        in Rigidbody properties, try to change Collision Detection to Continuous instead of discrete. Let me know if that helps.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 13 '18 at 10:21









        DrDevDrDev

        45427




        45427



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53275713%2funity-object-going-through-wall%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            Barbados

            How to read a connectionString WITH PROVIDER in .NET Core?

            Node.js Script on GitHub Pages or Amazon S3