Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Particle system limits the rotx to -90 and 90; This is not what I want.
Topic Started: Nov 18 2007, 01:25 AM (234 Views)
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
I am using the U3d particle system for my game, however, there is a problem. I cannot make the sparks velocity direction beyond 90, because the rotx limit forces the angle to be less than 90. This means I have sparks that are inconsistently tilted, which I don't want. Is there a way to "mod" the U3d engine so I can overcome this (and not have to build my own particle system which will lag up the game)?

"The next two functions set up the particle velocity and the particle acceleration (acceleration is the change of the velocity per step). This is pretty easy. The only thing you have to keep in mind about these functions is that the longitude has to be in the range from -90 to 90 because otherwise a method Ultimate 3D uses to achieve a regular spread of the particles won't work correctly."
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
Can't you just use a while loop?

Example:

Code:
 

while (rotx > 90)
{
rotx -= 180;
roty += 180;
}
while (rotx < -90)
{
rotx += 180;
roty -= 180;
}
while (roty > 360)
{
roty -= 360;
}
while (roty < 0)
{
roty += 360;
}
Quote:
 
I cannot make the sparks velocity direction beyond 90


Why in the world would you want it beyond 90 anyways? You're missing a whole piece of your mind if you can't hack away at the code yourself.
Blog|EHS
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
Well you see, that would not work because the particles system properties are defined only once (they are bullet sparks, remember). So, my code would be SetParticleVelocity(rotx-45,roty-45,0.1,rotx+45,roty+45,1). Therein lies the problem. If rotx is greater than 45 or less than -45, the randomness would stop at 90 and the sparks would become unbalanced, tilted if you will. So the only way to fix this would be to create 2 spark objects, which will lag up the game. Unless there is a way to mod U3d.
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
Create two spark objects. It won't lag up the game unless you do it incorrectly.
Blog|EHS
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
Hmmm...Actually making 2 polygons didn't work all too well, on certain slants the tilt was incorrect...oh well.
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply