Search Unity

Colliders not Colliding when FPS are to low

Discussion in 'Physics' started by detolox, Jun 19, 2018.

  1. detolox

    detolox

    Joined:
    Aug 15, 2013
    Posts:
    19
    Hi!!, I am developing a Tennis VR.. and my graphic card died.. so I have to work with an old one that
    with difficulty supports it.

    So I have a very weird problem.. When I move quick the racket it does not trigguer OnCollisionEnter.. I have to do the movement slowly

    That is what is happening to me..


    I try all the combinations
    Collision detection - Continuous or Continuos Dynamic.. etcetc..
    I also try the alrgorithm "Dont go through things"

    So..

    It is posible that is not working because of the low FPS? Right know I cannot test in other computer..
    I do not know what I am doing wrong..

    Thanks in advance!
     
  2. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    635
    Go into Project Settings > Time and change the physics timestep. 120 fps is 0.0083

    Maybe in Project Settings > Physics change default contact offset to 0.1 to test with. It'll start detecting collision earlier.

    The problem is, if we exaggerate it, the collider is going right through the ball before the next physics step possibly. If it was 1 fps for example, frame 1 the racket is on one side of ball and frame 2 (calculated 1 sec later) the racket is on the other side because you moved your VR hand but it didn't process it until in the real world it was on other side of the ball.
     
  3. detolox

    detolox

    Joined:
    Aug 15, 2013
    Posts:
    19
    I try with this.. and It does not work. Also I try to move the rigidbody via script.. and the result is the same..

    I do not know what should I do..
     
  4. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    635
    I mean at the end of the day this is kind of a waste of time, you shouldn't be trying to dev a VR game at 9fps. You can't simulate anything accurately and you don't expect any user to ever play it at 9fps. Just to be blunt and honest about it.
     
  5. detolox

    detolox

    Joined:
    Aug 15, 2013
    Posts:
    19
    Yes, of course.. as I said, my graphic card died, ASAP I will buy a new one..

    No one is going to use the game in my computer.. but I have to keep working with this conditions.. so my question was! Because of the low FPS rate is possible that the collisions are not triggering properly??..

    I guess that yes.. but a lot of people are telling me to try differents things.. but no one works.. so I do not know..
     
  6. Edy

    Edy

    Joined:
    Jun 3, 2010
    Posts:
    1,607
    • Configure Collision Detection as Continuous Dynamic in the racket, the ball and any other rigidbody you want them to interact with.
    • The elements that you are moving explicitly (i.e. the racket) must be kinematic rigidbodies, and you must move them using Rigidbody.MovePosition and Rigidbody.MoveRotation from FixedUpdate.
    That should fix the issue even in low frame rates. Do not modify the physics timestep.