PhysX cloth demo / weapon projectile collisions, wind
by Norm Koger · in Torque 3D Professional · 10/01/2009 (5:44 pm) · 4 replies
Collisions) Should the weapon projectiles be interacting with the cloth objects in the PhysX cloth demo? The PhysX docs suggest that cloth objects should be capable of collision checks - though only at vertices. The cloth objects themselves in the demo are marked for "triangleCollision". And the objects do interact, more or less, with the player when it passes through. But the projectiles sail right through without any apparent effect. I would like to experiment with projectile / cloth collisions, decal placement on the cloth objects at collision points - eventually extending the cloth treatment at the PhysX integration level (if necessary) to handle tears.
Wind) Looking through the PhysX docs and your pxCloth:processTick() code, I get the impression that setting enableWind="1" for a cloth object should enable a randomized wind effect on that object - but I am not seeing any effect. What am I missing?
Wind) Looking through the PhysX docs and your pxCloth:processTick() code, I get the impression that setting enableWind="1" for a cloth object should enable a randomized wind effect on that object - but I am not seeing any effect. What am I missing?
About the author
Professional game designer since 1987, with 11 mainstream titles released over the years. M.S. Physics. Software developer for SSI, TalonSoft, and now Storm Eagle Studios.
#2
Holy crap ... O_O
10/01/2009 (10:54 pm)
Quote:In 1.1 we're gonna have WindEmitters which will work with cloth, particle systems, and the ForestKit.
Holy crap ... O_O
#3
Is there something I need to know about rotating the cloth objects? I rotated one of the cloths 90 degrees so the default wind would hit face on rather than edge on, and the cloth snapped back to its original orientation as soon as I started the simulation. The rotation is still shown in the cloth object transform properties, but it isn't being reflected in the world at simulation time. Perhaps this has something to do with attachment points that need to be moved as well?
Update - The rotation is working now. Apparently there is some kind of initialization issue with the editor under certain circumstances. The other day, rotations snapped back at runtime. Now they're working fine with no change except, apparently, system state.
10/02/2009 (3:49 pm)
Thanks for the info. I managed to get the things waving in the breeze.Is there something I need to know about rotating the cloth objects? I rotated one of the cloths 90 degrees so the default wind would hit face on rather than edge on, and the cloth snapped back to its original orientation as soon as I started the simulation. The rotation is still shown in the cloth object transform properties, but it isn't being reflected in the world at simulation time. Perhaps this has something to do with attachment points that need to be moved as well?
Update - The rotation is working now. Apparently there is some kind of initialization issue with the editor under certain circumstances. The other day, rotations snapped back at runtime. Now they're working fine with no change except, apparently, system state.
#4
Also I tried tearing by setting some flags in code, but I assume that is meaningless if you don't trigger the tear some how with bullet collision.
Any help with any of this would be great, I am completely new to Physx.
09/24/2012 (3:10 pm)
Anyone get projectiles like the grenade in the Pacific demo or bullets to interact with the cloth?Also I tried tearing by setting some flags in code, but I assume that is meaningless if you don't trigger the tear some how with bullet collision.
Any help with any of this would be great, I am completely new to Physx.
Associate Tom Spilman
Sickhead Games
The projectiles are currently not interacting with the cloth... its a know issue and we'll get it working in 1.1.
As far as wind there is a "hack" to enable wind via a global var. Enter $PxCloth::enableWind = 1; into the console or place in somewhere in your script code.
In 1.1 we're gonna have WindEmitters which will work with cloth, particle systems, and the ForestKit.