List of usage examples for com.badlogic.gdx.graphics.g3d.decals Decal setPosition
public void setPosition(Vector3 pos)
From source file:com.github.fauu.helix.displayable.CharacterDisplayable.java
License:Open Source License
public CharacterDisplayable(IntVector3 logicalPosition, String animationSetName, TextureRegion shadowTexture) { super(logicalPosition.toVector3().add(DEFAULT_DISPLACEMENT)); animations = new AnimationSet(animationSetName); AnimatedDecal decal = AnimatedDecal.newAnimatedDecal(DEFAULT_DIMENSIONS.x, DEFAULT_DIMENSIONS.y, animations.getDefault(), true); decal.setKeepSize(true);// w w w. j av a 2s . c o m decal.setPosition(position); decal.rotateX(DEFAULT_ROTATION); setMainDecal(decal); Decal shadow = new Decal(); shadow.setPosition(position); shadow.translate(DEFAULT_SHADOW_DISPLACEMENT); shadow.setDimensions(DEFAULT_SHADOW_DIMENSIONS.x, DEFAULT_SHADOW_DIMENSIONS.y); shadow.setColor(1, 1, 1, .35f); shadow.setTextureRegion(shadowTexture); shadow.setBlending(GL20.GL_SRC_ALPHA, GL20.GL_ONE_MINUS_SRC_ALPHA); setShadowDecal(shadow); }