Search Unity

AddForce Imprecision - strange influence changing direction-

Discussion in 'Editor & General Support' started by Caps, Jul 23, 2010.

  1. Caps

    Caps

    Joined:
    Jul 23, 2010
    Posts:
    21
    Hi there,

    I have made a simple scene made by a simple and large plane and a flat cylinder (sort of like a button).

    I am applying a AddForce to this cylinder so it slides along the plane.

    The problem is, I have been launching this cylinder in various vector directions and after a few frames, it seems to move away from it's straight direction as some sort of force or influence changes its direction.



    Now this is really weird because the cylinder starts moving just fine in a straight line along its vector direction launch, but than before it stops, it seems to make some awckward curves in different axis...

    This really creaps me out for being something so simple and showing a perturbed behavior...


    Could someone please help me? If by any chance, someone could build the same scene setup (large plane as terrain, flat cylinder, launch cylinder using AddForce in various directions and observe the trajectory if it moves in a straight line or not, wich in my case it doesn't!

    I have attached a video file captured to show what's happening.

    Thank you
     

    Attached Files:

  2. Jesse Anders

    Jesse Anders

    Joined:
    Apr 5, 2008
    Posts:
    2,857
    What are the material properties? Could it be related to friction settings? (I'm not sure why friction would cause the path to curve like that, but it might be worth checking.)
     
  3. Caps

    Caps

    Joined:
    Jul 23, 2010
    Posts:
    21
    I have already tried different material settings like Ice, Metal etc. Also, I have changed physical properties like mass... Regardless of these changes it still curves, the only difference is the actualdistance the cylinders moves when "curving".


    I have attached another video showing this:
     

    Attached Files:

  4. Jesse Anders

    Jesse Anders

    Joined:
    Apr 5, 2008
    Posts:
    2,857
    I would suggest trying it with an orthographic camera looking straight down to make sure it's not some sort of perspective distortion. (It does look too pronounced for that, but it would probably be a good idea to eliminate that as a possible cause of the problem.)
     
  5. Caps

    Caps

    Joined:
    Jul 23, 2010
    Posts:
    21
    I have made a top orthographic cam to better watch the object move.

    I have attached a trail renderer to draw the trajectory.


    For my surprise, the object not only changes direcition, but seems to "snap" it's moving direction to one of the two world axis, x and z...

    This is really freaking me out...

    If anyone out there has a clue to what's going on, please let me know, this is my first Unity exercise and I'm already scared! :eek:
     

    Attached Files:

  6. Jesse Anders

    Jesse Anders

    Joined:
    Apr 5, 2008
    Posts:
    2,857
    I'm out of ideas, but maybe someone else will be able to help. (I don't know if there'd be any way to make the project itself available, but that would probably make it easier for others to try and diagnose the problem.)
     
  7. Caps

    Caps

    Joined:
    Jul 23, 2010
    Posts:
    21
    Hi Jesse,


    I've tried to upload the file project but I keep getting an error message: general error, tried to upload an empty file.

    When I was uploading the video files, when I tried to upload a file greater than 2Mb in size I would get this error...

    I don't know, am I doing something wrong or is this an error with the forum? this is strange because it says we can upload files up to 50Mb size.