Skip to content

Draft: Feature/wheel terrain - #202

Open
jokimmortal wants to merge 30 commits into
masterfrom
feature/wheel-terrain
Open

Draft: Feature/wheel terrain#202
jokimmortal wants to merge 30 commits into
masterfrom
feature/wheel-terrain

Conversation

@jokimmortal

Copy link
Copy Markdown
Contributor

Introduce GUI for DeformableTerrainWheel and related DeformableTerrainMaterial properties.

@jokimmortal jokimmortal self-assigned this Jun 8, 2026

@FilipAlg FilipAlg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work for the most part. The main thing that's missing is enable/disable support and test. Other than that and the crash that we've discussed, most of the comments is general cleanup.

On a higher level, I'm curious whether we should create default contact materials for all Wheel<>Terrain pairs in a scene automatically. Since the actual contact material configuration is minimal this should be pretty simple and could ease scene setup quite a bit. Not needed for this MR but I would be interested to hear your opinion on this.

Comment thread AGXUnity/Rendering/DebugTerrainHeightChangeRenderer.cs Outdated
Comment thread AGXUnity/Rendering/DebugTerrainHeightChangeRenderer.cs Outdated
Comment thread AGXUnity/Rendering/DebugTerrainHeightChangeRenderer.cs Outdated
Comment thread AGXUnity/Model/DeformableTerrainWheel.cs Outdated
Comment thread AGXUnity/Model/DeformableTerrainWheel.cs Outdated
Comment thread AGXUnity/Model/DeformableTerrainWheel.cs Outdated
Comment thread AGXUnity/Model/DeformableTerrainWheel.cs Outdated
/// </summary>
[SerializeField]
[FormerlySerializedAs( "WarnIfNotUsingCorrectForceModel" )]
private bool m_warnIfNotUsingCorrectForceModel = false;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be true by default? Does the component still work by default when the force model is not set correctly?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess in that case we might wanna do the logging only once per run (and contact material?) as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, if not using the correct contact model the friction will be partly using TerrainWheel but mostly rely on "legacy" contacts / terrain mechanics. Open for opinions on what's the desired case but I think generally we allow the user to set up components incorrectly but give hints when mistakes likely have been made. This is such a hint, which is meant to be toggled on when doing debugging rather than proactively telling the user they made a mistake. I.e. this way (default off, continuous warnings) is by design, do you disagree?

base.OnEnable();
}

protected override void OnDisable()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OnDisable & OnEnable need to be implemented

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you want there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants