Archived

This topic is now archived and is closed to further replies.

James Trotter

I need som help, plz...

Recommended Posts

I''m developing a Particle Engine, and there is one thing I can''t get to work. I''m trying to use functions such as setParticleSystemPosition(Vector3D new_position), to set the position of the particle system. But it doesn''t seem to be working! What am I doing wrong? Here is the function: void PARTICLE_SYSTEM:: setParticleSystemPosition(Vector3D new_position) { position = new_position; }

Share this post


Link to post
Share on other sites
Ok, im sorry if I didn''t make myself clear. But I''m not recieving any errors, but it just doesn''t set the value to the new value I specify, it just stays (0.0, 0.0, 0.0), after calling the function.
I''m nearly 100% sure that my = operator is overloaded properly, because I use it other places in the program and it works there, but here it is:

// Overloads the assignment (''='') operator
Vector3D& operator= (Vector3D v) {
x = v.x;
y = v.y;
z = v.z;
return *this;
}


And my Vector3D class contains these variables:

public:
float x, y, z;


And the particle system object:

PARTICLE_SYSTEM ps1;

And my call to the function to ste the position of the particle system:

ps1.setParticleSystemPosition(Vector3D(0.0f, 0.0f, -5.0f));


If there is any more information that you want me to provide then just ask =)

James

Share this post


Link to post
Share on other sites