Skip to content

Commit 2d1c27c

Browse files
authored
Updating prop_node.h
1 parent 1816d00 commit 2d1c27c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/ballistica/scene_v1/node/prop_node.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ class PropNode : public Node {
5959
void SetVelocity(const std::vector<float>& vals);
6060
auto GetPosition() const -> std::vector<float>;
6161
void SetPosition(const std::vector<float>& vals);
62+
auto GetRotate() const -> std::vector<float>;
63+
void SetRotate(const std::vector<float>& vals);
6264
auto extra_acceleration() const -> std::vector<float> {
6365
return extra_acceleration_;
6466
}
@@ -101,6 +103,8 @@ class PropNode : public Node {
101103
float max_speed_{20.0f};
102104
std::vector<float> velocity_{0.0f, 0.0f, 0.0f};
103105
std::vector<float> position_{0.0f, 0.0f, 0.0f};
106+
std::vector<float> rotate_{0.0f, 0.0f, 0.0f};
107+
bool rotate_set_{};
104108
std::vector<float> extra_acceleration_{0.0, 0.0, 0.0};
105109
float extra_mesh_scale_{1.0f}; // For use by subclasses.
106110
bool sticky_{};
@@ -145,6 +149,7 @@ class PropNodeType : public NodeType {
145149
BA_MATERIAL_ARRAY_ATTR(materials, GetMaterials, SetMaterials);
146150
BA_FLOAT_ARRAY_ATTR(velocity, GetVelocity, SetVelocity);
147151
BA_FLOAT_ARRAY_ATTR(position, GetPosition, SetPosition);
152+
BA_FLOAT_ARRAY_ATTR(rotate, GetRotate, SetRotate);
148153
BA_FLOAT_ATTR(density, density, SetDensity);
149154
BA_FLOAT_ATTR(damping, damping, set_damping);
150155
BA_FLOAT_ATTR(body_scale, body_scale, SetBodyScale);
@@ -174,6 +179,7 @@ class PropNodeType : public NodeType {
174179
materials(this),
175180
velocity(this),
176181
position(this),
182+
rotate(this),
177183
density(this),
178184
damping(this),
179185
max_speed(this),

0 commit comments

Comments
 (0)