Skip to content

Commit

Permalink
Solved ParticleObject problems of QSpringObject
Browse files Browse the repository at this point in the history
  • Loading branch information
erayzesen committed Jan 22, 2025
1 parent 5ef85e4 commit 3c0394a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 5 additions & 0 deletions src/qmesh_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,11 @@ void QMeshNode::on_post_enter_tree() {
}
for(int i=0;i<meshObject->GetSpringCount();i++ ){ //springs
Ref<QSpringObject> s=memnew( QSpringObject(meshObject->GetSpringAt(i)) );
Ref<QParticleObject> pA=get_particle_object_with_particle(meshObject->GetSpringAt(i)->GetParticleA() );
Ref<QParticleObject> pB=get_particle_object_with_particle(meshObject->GetSpringAt(i)->GetParticleB() );
s->pA=pA;
s->pB=pB;

springObjects.push_back(s);
}

Expand Down
4 changes: 0 additions & 4 deletions src/qspring_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ class QSpringObject: public RefCounted{
return this;
}

pA=particle_object_a;
pB=particle_object_b;

set_particle_a(particle_object_a);
set_particle_b(particle_object_b);
Expand All @@ -87,8 +85,6 @@ class QSpringObject: public RefCounted{
return Ref<QSpringObject>(this);
}

pA=particle_object_a;
pB=particle_object_b;

set_particle_a(particle_object_a);
set_particle_b(particle_object_b);
Expand Down

0 comments on commit 3c0394a

Please sign in to comment.