Reputation: 7
I would like to make a glow line with andengine by using the Line object. I've tried almost everything, i think.. Here is it:
As you can see here I was able to attach a glow line to a scene guided by the CanvasTextureCompositingExample, that was ok but my project loads many ITextureRegion
that when the BitmapTextureAtlas
loads, the objects I want to doesn't. I think it's because for the canvas I need a BitmapTextureAtlas
and if I want to load from the path assets BuildableBitmapTextureAtlas
.
The last thing I tried with this option was
this.mGreenTextureRegion=BitmapTextureAtlasTextureRegionFactory.createFromAsset(this.mBitmapTextureAtlas, this, "green.png",0,0)
but it does not load too.
CardinalSplineMoveModifier, CubicBezierCurveMoveModifier, QuadraticBezierCurveMoveModifier
Modifiers.I wast thinking about draw a Canvas first and then load a BuildableBitmapTextureAtlas
.
Any suggestion would be helpful. thanks by the way.
Upvotes: 0
Views: 219
Reputation: 7
Finally I think I found the solution, the problem was with the andengine line that is drawed, it seems ugly with pixels, so i wanted to those pixels go away and make a pretty smooth line. Maybe someone hit my problem, here's the solution:
@Override
public EngineOptions onCreateEngineOptions() {
final Camera camera = new Camera(0,0, CAMERA_WIDTH, CAMERA_HEIGHT);
EngineOptions options = new EngineOptions(true, ScreenOrientation.PORTRAIT_FIXED, new RatioResolutionPolicy(CAMERA_WIDTH,CAMERA_HEIGHT), camera);
options.getRenderOptions().setMultiSampling(true);//this make the smooth line
return options;
}
Upvotes: 1