Hello Paolo,
thanks for reaching out and welcome.
Unfortunately it is not possible to achieve what you are asking with standard modules, but I have prepared a scene for you to show you a way to go.
You can change the "gravity" metadata via script or any other way.
In the scene you will find an agent walking on a slope, the agent group containing that agent has a few modules:
- an add metadata adding a double metadata "alignGravity" which is created on the first frame and set to 0
- two area triggers modifying the value of the "alignGravity" metadata from 0 (not aligning the up vector to the mesh normal) and 1 (aligning the up vector to the mesh normal). Each area trigger has a 10 blend frame to smooth the transition.
- a custom module (GravityModifier). This module takes as input the height field name (set to "hf") and the name of the metadata (set to "alignGravity"). Internally the module simply modifies the gravity metadata of the agent based on the "alignGravity" metadata value.
You can see the GravityModifier module inside the AtomsUI under the BehaviourModules tab.
Please let us know if you need further help with this or have any other questions.
Thanks,
Daniele