- Home /
Mobile Build and Playmode Terrain Collision Disparity
Hello!
I have a 3D scene in which a Unity terrain (made completely within Unity, nothing imported) and a moveable player character are present. The terrain has a terrain collider and the player has a capsule collider along with a rigidbody.
The issue I'm having is that when I build this to a physical android phone, the player can completely pass through the terrain but only at certain points. In other words, the collision detection between the player and the terrain will act as expected, but not always. There are some points when the player will just pass right through a terrain wall, for example. Also, the player character is not moving extremely fast, either; he always moves at a comfortable, fixed speed.
Also, it is important to note that this only happens on mobile builds. This has never happened in the Play mode on desktop. Furthermore, I should note that I move the player in the FixedUpdate() function as follows (in this example, it is to move the player forward; playerCurrentSpeed is set to 4f):
playerRigidbody.transform.position += playerRigidbody.transform.forward * Time.deltaTime * playerCurrentSpeed;
Here is my question: what could be causing this disparity and how might I fix it?
Here is a list of unsuccessful attempts that I have made to try to fix this disparity:
Changed the fixed timestep and maximum allowed timestep in project settings
Increased the Terrain thickness
Ensured that on start, the player's capsule collider is not intersecting with the terrain
Thank you for your time!
Your answer
Follow this Question
Related Questions
Terrain into Model 0 Answers
Destroy Terrain Trees And They Collider 0 Answers
Ignoring Rendering 0 Answers
Terrain Collision Glitch 1 Answer
Unity3.4 Mobile Terrain Lag 1 Answer