I saw some tutorials using alpha on JMEPhysics tutorials.
But those use deprecated methods.
I have this:
final AlphaState alphaState = display.getRenderer().createAlphaState();
alphaState.setEnabled( true );
alphaState.setBlendEnabled( true );
alphaState.setSrcFunction( AlphaState.SB_SRC_ALPHA );
alphaState.setDstFunction( AlphaState.DB_ONE_MINUS_SRC_ALPHA );
spatial.setRenderState( alphaState );
spatial.setRenderQueueMode( Renderer.QUEUE_TRANSPARENT );
And i tried to figure out how should i change it to make it work.
I dont really know if i should use blendState or what.. it works, but... not very good.
final BlendState blendState = display.getRenderer().createBlendState();
blendState.setEnabled(true);
blendState.setBlendEnabled(true);
blendState.setSourceFunctionAlpha( blendState.getSourceFunctionAlpha().SourceAlpha );
blendState.setDestinationFunctionAlpha( blendState.getDestinationFunctionAlpha().OneMinusSourceAlpha);
spatial.setRenderState( blendState );
spatial.setRenderQueueMode( Renderer.QUEUE_TRANSPARENT );
Any ideas? is it ok or not? anywhere i could see alpha examples for jme2?