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

Discussion Overview

The discussion centers around the behavior of a sphere passing through a plane in Unity 2017.1, specifically whether this phenomenon is a bug or an expected behavior of the physics engine. Participants explore the conditions under which the sphere intersects the plane and the implications for physics calculations within the game engine.

Discussion Character

  • Debate/contested, Technical explanation

Main Points Raised

  • One participant describes a scenario where a sphere with a rigidbody passes through a plane at specific altitudes, noting that this occurs at 3.5 and 5.0 units but not at 5.1 or 4.9 units.
  • Another participant suggests reporting the issue directly to Unity, indicating that there are forums for developer inquiries.
  • A later reply reiterates the initial observation about the sphere's behavior and argues that this is not a bug, explaining that the physics engine operates on discrete frames, which can lead to such occurrences.
  • This participant also mentions using ray tracing for fast-moving objects as a workaround to avoid the issue of passing through the plane.
  • Another contributor, with experience in software testing, agrees that the behavior described is not a bug, emphasizing that a bug typically involves the software failing to handle calculations correctly.

Areas of Agreement / Disagreement

Participants generally disagree on whether the observed behavior constitutes a bug. Some argue it is an expected outcome of the physics engine's design, while others suggest it should be reported as a potential issue.

Contextual Notes

The discussion highlights the limitations of the physics engine's discrete calculations and the conditions under which the sphere's behavior occurs, but does not resolve the underlying question of whether this is a bug.

Who May Find This Useful

Developers working with Unity, particularly those interested in physics simulations and collision detection, may find this discussion relevant.

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
 

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
3K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 2 ·
Replies
2
Views
615