I’m curious if Unity’s cloth system supports the following two use cases:
- Let’s say there’s a cloth banner hanging from a pole. An explosion occurs nearby. The cloth should be pushed away from the explosion. Is there a way to apply forces to the cloth programmatically?
- Let’s say that while the cloth is moving, it passes over a fire, which is a game object with a trigger collider. Can the cloth cause the trigger to fire?
Thanks,
-Dan
For the explosion you should be able to actively change External Acceleration when the explosion happens. If the explosion is a random position you will have to write a script to determine the direction of External Acceleration. Not difficult to do btw.
I have never used a cloth as a trigger but you should be able to use a trigger collider then use OnTriggerEnter, have you tried this?
Thanks, I’ll look into External Acceleration. I wasn’t familiar with it.
I tried to get the cloth to set off a trigger, but it didn’t work. For testing, I had a capsule collider, which I added to the Cloth’s list of colliders, set it to IsTrigger, and made it overlap with the cloth, but it didn’t fire the trigger.