Hi @YC-Lin , while we’re looking into a fix in USDRT, can you check if you can use the PhysxForceAPI from PhysxSchema in standard USD stage, here’s the example:
from omni.isaac.kit import SimulationApp
simulation_app = SimulationApp({"headless": False})
import omni.usd
from pxr import UsdPhysics, PhysxSchema
ctx = omni.usd.get_context()
stage = ctx.get_stage()
path = "/World/WindField"
# Create the prim using USD stage (not USDRT)
omni.kit.commands.execute('CreatePrim',
prim_path=path,
prim_type='Xform',
select_new_prim=True)
# Get the prim from the USD stage
wind_xform = stage.GetPrimAtPath(path)
# Apply the API using standard USD (not USDRT)
force_api = PhysxSchema.PhysxForceAPI.Apply(wind_xform)
force_api.CreateForceAttr().Set((10.0, 0.0, 0.0)) # Example force vector
print(force_api) # Should be valid now
I wonder if it is possible to use ForceFieldAPI in standard USD stage.
No, there’s no ForceFieldAPI in standard USD stage.
I need “ForceFieldAPI” instead of “ForceAPI”.
The USDRT schema is outdated and we need to update it to match the USD schema, so I think ForceFieldAPI won’t be available anymore. Any specific reason you cannot migrate to ForceAPI?
Because I don’t just need ForceFieldAPI, my main goal is to use the Drag and Wind force field features. Can these still be used in versions after 5.0? Or are there any alternative solutions?