Does anyone know how to get faces to share a UV in max? For example the back side of a house should have the same texture as the front? I've seen a bunch of UV Unwraps that show just unique faces in the UV but I'm not sure how to do it.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu
public void moveForward(Object3D terrain) {
SimpleVector vnew = _main.getZAxis();
vnew.scalarMul(speed);
SimpleVector vcoll = _main.checkForCollisionEllipsoid(vnew, _ellipsoid, 5);
boolean bNoHit = (vcoll.x == vnew.x && vcoll.z == vnew.z && vcoll.y == vnew.y);
vnew = vcoll;
vnew.y = 0;
_main.translate(checkGroundDynamics(vnew, terrain));
}
private SimpleVector checkGroundDynamics(SimpleVector vnew, Object3D terrain){
SimpleVector vret = null;
try{
SimpleVector vdist = new SimpleVector(0, 1, 0);
float fdist = terrain.calcMinDistance(_main.getTransformedCenter(), vdist);
if (fdist != Object3D.COLLISION_NONE) {
fdist -= 10;
vdist.scalarMul(fdist - 4);
float jump_offset = getJumpOffset();
float fdiff = (_height_offset + jump_offset) + vdist.y;
// end any jump if a surface was discovered - typically jumping
// to a higher plane will cause this....
if(fdiff == 0 && _blocking_animation)
_blocking_animation = false;
// simulate gravity and smooth the jarring movement upward as well.
// this may cause some minor clipping on slopes but its too jarring without it
// making jumps hard to control.
if(fdiff > SMOOTH_FACTOR_Y)
fdiff = SMOOTH_FACTOR_Y;
if(fdiff < (SMOOTH_FACTOR_Y * -1f))
fdiff = SMOOTH_FACTOR_Y * -1f;
vnew.y = fdiff;
}
vret = new SimpleVector(vnew);
}catch(Exception e){
System.err.println("CreatureComposite::checkGroundDynamics() " + e.getMessage());
e.printStackTrace();
}
return vret;
}
private float getJumpOffset(){
SimpleVector vret = null;
try{
if((_ai.name.equals(ANIM_JUMP1) || _ai.name.equals(ANIM_JUMP2)) && _blocking_animation){
float fdelta = 0f;
if(_ai.frame < _ai.duration/2f){
_ai.jump_offset -= _ai.jump_rate;
}else{
_ai.jump_offset += _ai.jump_rate;
}
}
}catch(Exception e){
System.err.println("CreatureComposite::checkJumpDynamics() " + e.getMessage());
e.printStackTrace();
}
return _ai.jump_offset;
}
rotMat=getRotationMatrix();
rotMat.setIdentity();
setRotationMatrix(rotMat);
if(_anim > 1)
_anim=0;
else
_anim+=0.05f;
//check for the apex of a jump here....
this.animate(_anim, _seq);
Page created in 0.018 seconds with 9 queries.