Is the Sphere Passing Through the Plane in Unity 2017.1 a Bug?

  • Thread starter Thread starter thomas9059
  • Start date Start date
  • Tags Tags
    Bug
Click For Summary
A user reports a bug in Unity where a sphere with a rigidbody passes through a plane at specific altitudes, notably when the sphere is positioned 3.5 units above the plane and scaled to (0.2, 0.2, 0.2). The issue is also observed at 5.0 units but not at 5.1 or 4.9. Other users suggest reporting the issue directly to Unity, indicating that it may not be a bug but rather a result of how the physics engine operates. The physics engine calculates positions frame by frame, which can lead to objects passing through each other if they move too quickly between frames. For fast-moving objects, it is recommended to use ray tracing to detect collisions and adjust positions accordingly, as this method is more reliable for small or fast objects. Overall, the consensus is that the behavior is expected due to the limitations of the physics calculations in Unity.
thomas9059
Messages
1
Reaction score
0
Hi,
Not sure if here is were i should report the bug. If you make a plane and a sphere with a rigidbody, at some specifics altitudes, the sphere goes trough the plane.
To reproduce it easily, i put the sphere 3.5 units higher than the plane and change the sphere scale to (0.2 , 0.2 , 0.2).
This also ocurs with other altitudes like 5.0, but no with 5.1 or 4.9.
 
Technology news on Phys.org
thomas9059 said:
Hi,
Not sure if here is were i should report the bug. If you make a plane and a sphere with a rigidbody, at some specifics altitudes, the sphere goes trough the plane.
To reproduce it easily, i put the sphere 3.5 units higher than the plane and change the sphere scale to (0.2 , 0.2 , 0.2).
This also ocurs with other altitudes like 5.0, but no with 5.1 or 4.9.
This is not a bug, this is how the physics engine works.

The engine works by calculating a frame at a time, so if In frame 1 the transform was above the plane and the next it was below, that's what it calculates. It has no sense of what happened in the in between, it's completely discreet physics because that's easy to calculate. (It may have an adjustable iteration setting, so it's more than once a frame, but still discreet.). Interpolating would cost way too many CPU cycles.

For fast moving object, you rely on raytracing instead of the rigid body. Use Physics.Raytrace from one point to another. If that returns a collision with something, warp the transform.position to the collision point and let the physics engine handle the calculations from there.

This is how I do things like bullets which are scaled way smaller than 0.2 and moving much faster than your ball.
 
Spent many years testing software and as newjerseyrunner says this is not a bug. A bug is more usually the software not coping with the calculatoin and falling over
 
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

  • · Replies 2 ·
Replies
2
Views
6K
Replies
5
Views
5K
  • · Replies 2 ·
Replies
2
Views
5K
Replies
5
Views
4K
Replies
3
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K