Draft: Feature/wheel terrain - #202
Conversation
… for checking friction type
…a ScriptableAsset
FilipAlg
left a comment
There was a problem hiding this comment.
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.
| /// </summary> | ||
| [SerializeField] | ||
| [FormerlySerializedAs( "WarnIfNotUsingCorrectForceModel" )] | ||
| private bool m_warnIfNotUsingCorrectForceModel = false; |
There was a problem hiding this comment.
Should this be true by default? Does the component still work by default when the force model is not set correctly?
There was a problem hiding this comment.
I guess in that case we might wanna do the logging only once per run (and contact material?) as well
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
OnDisable & OnEnable need to be implemented
There was a problem hiding this comment.
What do you want there?
Introduce GUI for DeformableTerrainWheel and related DeformableTerrainMaterial properties.