Jump to content
  • Advertisement


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

James Trotter

I need som help, plz...

This topic is 5778 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
What error are you getting? Then post some relevant code (vector storage definition and the = operator).

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:

float x, y, z;

And the particle system object:


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 =)


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!