Alright, I am literally stumped on this and would like some alternative ideas as to why it happens. Here's the code first:
public void moveInBounds() {
this.tempvector = this.object.getTransformedCenter(this.tempvector);
if(this.origin != null) this.tempvector.sub(this.origin);
if(this.bounds.x > 0.0f) this.tempvector.x = (this.tempvector.x < -this.bounds.x) ? -this.bounds.x :
((this.tempvector.x > this.bounds.x) ? this.bounds.x : this.tempvector.x);
if(this.bounds.y > 0.0f) this.tempvector.y = (this.tempvector.y < -this.bounds.y) ? -this.bounds.y :
((this.tempvector.y > this.bounds.y) ? this.bounds.y : this.tempvector.y);
if(this.bounds.z > 0.0f) this.tempvector.z = (this.tempvector.z < -this.bounds.z) ? -this.bounds.z :
((this.tempvector.z > this.bounds.z) ? this.bounds.z : this.tempvector.z);
if(this.origin != null) this.tempvector.add(this.origin);
this.object.clearTranslation();
this.object.translate(this.tempvector);
}
Now the problem is that when moving the object, then checking for if it's in bounds, the x and z directions work as expected, the object stops at the edge like there's an invisible wall. However the y acts funny, moving down(+) there's a bounce, and moving up(-) it takes a large value to pull it back down from the edge. I seriously have no idea why it's doing this, if anyone has an idea let me know.
The bounds are how far the object can move from it's origin, not the jPCT origin but the origin set for the actor.