Visualize Collision Shapes
Posted: Tue Jan 13, 2015 10:22 pm
In the past few days I've added a new feature to visualize collision shapes (and potentially also other entities of bullet, our physics engine). This feature can be turned on and off with a console command:
Param 1: [bool] true = enable visualization, false = disable visualization
Param 2: [bool] true = fill the volumes, false = draw wireframe (optional, default is true)
Param 3: [float] the transparency of the filling (if param 2 is true) with 0 = invisible and 1 = solid (optional, default is 0.5)
Examples:
Please note that bullet supports round collision shapes, but ogre of course cannot render completely round surfaces. So the visualization of round shapes is only approximately correct (this is especially noticeable with spheres).
The performance is rather bad, so you better don't use this in a level with lots of objects.
And this is how it looks:
Code: Select all
debugDrawPhysics <bool> [bool=true] [float=0.5]
Param 2: [bool] true = fill the volumes, false = draw wireframe (optional, default is true)
Param 3: [float] the transparency of the filling (if param 2 is true) with 0 = invisible and 1 = solid (optional, default is 0.5)
Examples:
Code: Select all
debugDrawPhysics true # enable visualization
debugDrawPhysics true false # enable visualization with wireframe
debugDrawPhysics true true 0.95 # enable visualization with almost solid filled volumes
The performance is rather bad, so you better don't use this in a level with lots of objects.
And this is how it looks: