Jump to content

kabb

Members
  • Posts

    4
  • Joined

  • Last visited

kabb's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Could you add that to the github project? By default, github projects are licensed as all rights reserved without an explicit license.
  2. Is there any license on this project?
  3. I ended up figuring out the problem was that I needed to get and use the SpriterModObject for the torso, not the SpriterObject.
  4. 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?
×
×
  • Create New...