Hello everyone, i have 2 questions.
the first one is:
I'am using the RenParticleEditor.java to edit and save my effects, ok, the save file is .jme, how could i import the .jme to my game?
the second :
My model is .md5, how i can put for example fire in the hands? because i'am trying use attachchild(particle, "Joint")
but it's not compatible.
thankss
- BinaryImporter.load()
keep in mind that its possible, that different jme versions are not binary compatible tho.
A effect created with jme1 is not compatible with jme2 for example.
hamm, but can you be more specific? i'am using jme 2, and i try BinaryImporter.load() but i got some errors
can you give me syntax?
ok ok i found everything i need in the forum, but i make a test and thats is happening to me :
how can i fix this squares?
thanks
Add this state to your particle node:
zstate = display.getRenderer().createZBufferState();
zstate.setWritable(false);
and maybe this as well If you want:
bs = display.getRenderer().createBlendState();
bs.setBlendEnabled(true);
bs.setSourceFunction(SourceFunction.SourceAlpha);
bs.setDestinationFunction(DestinationFunction.One);
bs.setTestEnabled(true);
bs.setTestFunction(TestFunction.GreaterThan);
where i have to put this code? in my procedure when i create the particles?
Yes, or on the node you attach the particles to. Attach it with:
node.setRenderState(zState);
ohh thanks i did it, thank you very much (((:
but have the another question, how i attach the particle effect in one Joint or part of my character? for example the hands or foots?
i'am trying to this:
Spatial particle = createParticle();
IJoint j = body.getJoint(17);
j.getTranslation();
particle.setLocalTranslation(j.getTranslation());
particle.setLocalScale(1f);
I have not used those joints (md5?) so I don't know. But something like this in theory:
joint.attachChild(particle);
no, can't attach in the join.
i have this too:
17 is the number of the joint
body.attachChild(particle, 17);
but the program say "Particle it's not compatible, because body is a MD5 Node"
i try to convert Particle to md5 node but dosen't work :(
nobody knows how i can attach the particle effect in one joint? for example in the hands or foots?
i need it to make the skills, please help me
If you are setting the local translation of the particles to the local translation of the joint, then the parent node of the model and the particles must be the same. So it must be like this:
Root Node
-Particles (at x, y, z)
-Body
-Arm (at x, y, z)
ok it works thanks very much