kabb
-
Posts
4 -
Joined
-
Last visited
Content Type
Forums
Store
Gallery
Downloads
Posts posted by kabb
-
-
Is there any license on this project?
-
Sorry guys, for not responding to your questions. I am quite busy now.
@Aniketos: The ref is null in the first place, because the loader is putting a null reference into the texture map and in a next step the actual loaded file reference will replace the the null reference. Are you loading will multiple threads?
@kabb: This is really weird. It should work. Could you send me your whole code?
- Trixt0r
I ended up figuring out the problem was that I needed to get and use the SpriterModObject for the torso, not the SpriterObject.
-
I've been having a bit of trouble manipulating bones at runtime. Currently, I'm using this code in my render loop:
//Update position
player.update(x, y);
//Get torso bone and set angle
SpriterBone torso = player.getBoneByName("Torso");
Vector2 mouseLoc = new Vector2(Gdx.input.getX(), Gdx.input.getY());
Vector2 playerLoc = entity.getComponent(Physics.class).getLocation().toCameraCoords();
float angle = MathUtils.atan2(mouseLoc.y - playerLoc.y, mouseLoc.x - playerLoc.x) * MathUtils.radDeg;
torso.setAngle(angle);
//Render player
spriteBatch.begin();
spriterDrawer.draw(player);
spriteBatch.end();However, the torso's angle never updates from it's original angle (which is 90 degrees). The player is running an idle animation while I try to do this, but that animation never actually changes the torso in any way, so I'm not sure why the angle won't update. Anyone know what I'm doing wrong?
Generic Java Importer
in Spriter Implementations
Posted
Could you add that to the github project? By default, github projects are licensed as all rights reserved without an explicit license.