Skip to content

Commit

Permalink
update field name
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Apr 26, 2021
1 parent 81381f0 commit 2256147
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sdf/1.7/particle_emitter.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
</description>
</element>

<element name="scatter_ratio" type="float" default="0.65" required="0">
<element name="particle_scatter_ratio" type="float" default="0.65" required="0">
<description>
This is used to determine the ratio of particles that will be detected
by sensors. Increasing the ratio means there is a higher chance of
Expand Down
2 changes: 1 addition & 1 deletion src/ParticleEmitter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ Errors ParticleEmitter::Load(ElementPtr _sdf)
"topic", this->dataPtr->topic).first;

this->dataPtr->scatterRatio = _sdf->Get<float>(
"scatter_ratio", this->dataPtr->scatterRatio).first;
"particle_scatter_ratio", this->dataPtr->scatterRatio).first;

if (_sdf->HasElement("material"))
{
Expand Down
2 changes: 1 addition & 1 deletion test/sdf/world_complete.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
</pbr>
</material>
<color_range_image>materials/textures/fogcolors.png</color_range_image>
<scatter_ratio>0.2</scatter_ratio>
<particle_scatter_ratio>0.2</particle_scatter_ratio>
</particle_emitter>

<light name="spot_light" type="spot">
Expand Down

0 comments on commit 2256147

Please sign in to comment.