mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:03:57 +02:00
fix particle init
This commit is contained in:
parent
42528be7ca
commit
53e7cd7797
2 changed files with 9 additions and 0 deletions
|
@ -92,6 +92,10 @@ Particle::Particle(const ParticleID& particleID, const ParticleProperties& prope
|
|||
_script = DEFAULT_SCRIPT;
|
||||
_inHand = NOT_IN_HAND;
|
||||
_shouldDie = false;
|
||||
_modelURL = DEFAULT_MODEL_URL;
|
||||
_modelTranslation = DEFAULT_MODEL_TRANSLATION;
|
||||
_modelRotation = DEFAULT_MODEL_ROTATION;
|
||||
_modelScale = DEFAULT_MODEL_SCALE;
|
||||
|
||||
setProperties(properties);
|
||||
}
|
||||
|
@ -124,6 +128,10 @@ void Particle::init(glm::vec3 position, float radius, rgbColor color, glm::vec3
|
|||
_script = updateScript;
|
||||
_inHand = inHand;
|
||||
_shouldDie = false;
|
||||
_modelURL = DEFAULT_MODEL_URL;
|
||||
_modelTranslation = DEFAULT_MODEL_TRANSLATION;
|
||||
_modelRotation = DEFAULT_MODEL_ROTATION;
|
||||
_modelScale = DEFAULT_MODEL_SCALE;
|
||||
}
|
||||
|
||||
void Particle::setMass(float value) {
|
||||
|
|
|
@ -56,6 +56,7 @@ const float DEFAULT_RADIUS = 0.1f / TREE_SCALE;
|
|||
const float MINIMUM_PARTICLE_ELEMENT_SIZE = (1.0f / 100000.0f) / TREE_SCALE; // smallest size container
|
||||
const glm::vec3 DEFAULT_GRAVITY(0, (-9.8f / TREE_SCALE), 0);
|
||||
const QString DEFAULT_SCRIPT("");
|
||||
const QString DEFAULT_MODEL_URL("");
|
||||
const glm::vec3 DEFAULT_MODEL_TRANSLATION(0, 0, 0);
|
||||
const glm::quat DEFAULT_MODEL_ROTATION(0, 0, 0, 0);
|
||||
const float DEFAULT_MODEL_SCALE = 1.0f;
|
||||
|
|
Loading…
Reference in a new issue