diff options
| author | Rémi Verschelde | 2018-02-19 22:15:49 +0100 |
|---|---|---|
| committer | GitHub | 2018-02-19 22:15:49 +0100 |
| commit | b2aeb02e7d43d98973334e39db5c39626ba9f775 (patch) | |
| tree | d0d97ce31a873972558a01d7e12d3157f7162869 /servers/physics_2d/shape_2d_sw.cpp | |
| parent | 6ee4298ee3192e2c82e7b26b078f32302764ace5 (diff) | |
| parent | ffc3ef86778f486823bedf66cc5a937fc09abe6a (diff) | |
| download | godot-b2aeb02e7d43d98973334e39db5c39626ba9f775.tar.gz godot-b2aeb02e7d43d98973334e39db5c39626ba9f775.tar.zst godot-b2aeb02e7d43d98973334e39db5c39626ba9f775.zip | |
Merge pull request #16530 from AndreaCatania/rays
Improved ray shape (2D and 3D) by addiing the possibility to act as r…
Diffstat (limited to 'servers/physics_2d/shape_2d_sw.cpp')
| -rw-r--r-- | servers/physics_2d/shape_2d_sw.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp index 5893f1982..433942708 100644 --- a/servers/physics_2d/shape_2d_sw.cpp +++ b/servers/physics_2d/shape_2d_sw.cpp @@ -184,13 +184,18 @@ real_t RayShape2DSW::get_moment_of_inertia(real_t p_mass, const Size2 &p_scale) void RayShape2DSW::set_data(const Variant &p_data) { - length = p_data; + Dictionary d = p_data; + length = d["length"]; + slips_on_slope = d["slips_on_slope"]; configure(Rect2(0, 0, 0.001, length)); } Variant RayShape2DSW::get_data() const { - return length; + Dictionary d; + d["length"] = length; + d["slips_on_slope"] = slips_on_slope; + return d; } /*********************************************************/ |
