Can I prevent player through terrain when terrain height is modified at runtime?


I'm modifying the terrain programmatically by raising it 0.1m per second at any point my character controller is standing, and as expected, it falls through. I've been looking at the CharacterMotor script to look for a place I can modify it to accommodate the change, but I'm not having any success. Ideally the character controller should rise with the terrain, like it would with a platform. Can anyone suggest a way to achieve this?


When u adjust the y-axis for the terrain, u could also adjust the y-axis of the character!!

If the terrain's y-axis gets increased via script, so increase the y-axis of your character!!

Or am i undesrtanding u wrong?