How to make FBX model climbing on a slope - unity3d

Related to the image below:
The Tank is a FBX model, imported with "Generate Colliders" checked. I want to make the tank walking the slope in front of it, which is just a resize cube from Unity ediftor. I tried different approaches : I added a rigidbody to the tank (receiving a message error), I added rigidbody to the cube. Nothing works.
This is my Tank Setting Capture
Could you help me ?

You Should Uncheck the 'Is Trigger' Option for that cube, So that it'll stop Your Tank colliding in to the Cube

One option you could try is implementing NavMesh and NavMeshAgent in your tank and environment. NavMeshAgent allows you to choose how big objects the agent can ignore and how steep slope it can cross etc.
Basic NavMesh implementation can be found on the unity docs: Unity Building navmesh
Remember to set all the environment as navigation static from the navigation menu in order for agent to realize that it can climb over them etc.

Maybe a bit silly, but do you have a mesh collider added to the tank object?

Related

Cannot move object with NavMeshAgent in Unity

I can't move uploaded models in the Unity with NavMeshAgent. They just walk while standing still. And whenever I start the game it gets it's "y" position as something different than it should be. This might be the problem but there's nothing that changes the position.
To use NavMeshAgent you need to add Rigidbody component to your uploaded model and also bake your NavMesh like terrain, obstacles and so on.

Unity adding navmesh agent but why does the navmeshagent area goes on top of the object?

I don't know why, but when I tried to give a ship a navmesh agent, when played it suddenly flipped From this Normal Ship To this Flippedship. And when I check it, it is because the area of the navmesh agent is on top of the ship like this.NavMeshAgent area for the ship. Is there anyway to change it?
PlayerUnitShipRoot <----NavMeshAgent
PlayerUnitShip <----Mesh Filter & Mesh Renderer
Create a new GameObject (PlayerUnitShipRoot).
Put your orignial model (PlayerUnitShip) under it.
Add a NavMeshAgent on PlayerUnitShipRoot.
Move and rotate PlayerUnitShip to a proper position.

Strange behavior with collisions in unity

I have a gameobject player that has a character controller and a gameobject cube that has a rigidbody.
I'd like to make my character go through the cubes like a Trigger. Except that I want the cubes to keep their gravity and physics.
I did a little research and found Physics.IgnoreCollision or the layer collision matrix. Both methods work, I get through my cubes well, except that I have a weird behavior that makes me feel like I'm bumping into each one of them, so I find myself slowed down in my momentum...
Is there a solution to my problem?
In the Unity menu bar, go to Edit > Project Settings, then select the Physics category to open the Physics window. You will find a Matrix and here you can uncheck the collision between 2 layers. If you put the cubes in a layer and the player in another layer and in the matrix you uncheck the box, cubes will maintain their properties and player will pass through them.

Why navmesh can detect all subtilities of my model while meshcollier can't?

I just made a quick terrain in sketchup to test an fps system I made.
The navmesh fits perfectly my model (which is imported in one block) but I made some research and couldn't find a way to hade a clean collider following the model so my Player could navigate normally through it. Isn't there any way to do so?
You need to set your collider to be a concave mesh.
Untick the "Convex" settings on the mesh collider

Blender to Unity: Add Custom Collider to A Low Poly Style Terrain

I have created a low poly terrain object from Blender using a Plane, displaced and decimated it. I then exported it to Unity as an FBX object. As what I expected, my player simply falls through it since it has no colliders on. I could place a Box Collider on the object, but seeing it is a low poly style terrain with lots of bumps, it'll be pretty awkward to have my player walk straightly even if the ground is slightly raised. Even so, there are mountain areas in my terrain object and box colliders would totally be out of the question.
I was thinking of using the Mesh Collider in Unity. I tried experimenting with it but failed. There are also no clear tutorials online on the said situation. How can I add a custom collider to this terrain so the player can walk to it, plus without using the hastly Box Collider.
Here is my terrain object in Blender:
As you can see, putting a box collider is totally impossible.
You can make individual Sphere, Capsule and Box Colliders, hide their Mesh Renderers and then rotate, scale and place them to make something similar to your mesh. However, Mesh Colliders should be your best option, after adding a mesh collider to your mesh, make sure the convex option is NOT checked and also make sure to select the same mesh that the GameObject is using from the Mesh field in the Mesh Collider component.
Alternatively, if you want your collider to be simpler than your actual mesh, you could make a simpler mesh (either with an external program or by downloading the ProBuilder package in Unity), overlay that mesh with the terrain you have, give it a Mesh Collider and then hide its Mesh Renderer component.
I don't exactly understand what you meant by "I tried experimenting with it but failed." Did your character keep falling through? Did the character get stuck? Was the mesh collider generated in an incorrect way? I would be able to help you better if you can give me a detailed explanation.