Constructor and Description |
---|
PositionTracker(com.badlogic.gdx.physics.box2d.Body body) |
Modifier and Type | Method and Description |
---|---|
com.badlogic.gdx.physics.box2d.Body |
getBody() |
float |
getCurrentX() |
float |
getCurrentY() |
float |
getRenderX() |
float |
getRenderY() |
void |
interpolate(float alpha)
Calculates the render coordinates by linear interpolating between the
previous and current position
|
void |
update()
Updates the coordinates
|
public void update()
public void interpolate(float alpha)
alpha
- The alpha value to interpolate bypublic float getCurrentX()
public float getCurrentY()
public float getRenderX()
public float getRenderY()
public com.badlogic.gdx.physics.box2d.Body getBody()
Copyright © 2014. All rights reserved.