Hi!
I'm trying to represent my character in a first person view.
I don't need to represent weapons and something like that;
I just want to make my character collidable.
So I put a sphere with a boundingbox around the camera, but I don't succeed in making it transparent!
Here's my code:
AlphaState as =display.getRenderer().createAlphaState();
as.setSrcFunction(AlphaState.SB_SRC_ALPHA);
as.setDstFunction(AlphaState.DB_ONE_MINUS_SRC_ALPHA);
Node actorNode = new Node("ActorNode");
shape = new Sphere("Actor",cam.getLocation(),20,20,10);
shape.setSolidColor(new ColorRGBA(1,1,1,0));
shape.setLightCombineMode(LightState.OFF);
actorNode.attachChild(shape);
actorNode.setRenderState(lightState);
wrapper = new BoundingBox();
shape.setModelBound(wrapper);
shape.updateModelBound();
as.setEnabled(true);
as.setBlendEnabled(true);
actorNode.setRenderState(as);
Do u see any mistake?
Thank you :)