dim3 Forum

Full Version: Hitbox problems
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've prepared a decent walking animation for my Dæmon, and tested it in the engine many times. Unfortunately, projectiles go through (and crosshairs ignore) my Body and Head HitBoxes. I cant see any logical reason for it.
dimwit Wrote:I've prepared a decent walking animation for my Dæmon, and tested it in the engine many times. Unfortunately, projectiles go through (and crosshairs ignore) my Body and Head HitBoxes. I cant see any logical reason for it.

What's the "construct" function for the Daemon's script look like?

[>] Brian
It still almost looks exactly like the JoeFoe script:

Code:
function joeFoeConstruct(obj)
{
        // setup model
        
    obj.model.on=true;
    obj.model.name='King Daemon';
    obj.model.lit=DIM3_MODEL_LIT_VERTEX;
    obj.model.truform=true;
    obj.model.shadow.on=true;
    
        // setup joefoe settings

    obj.setting.hitBox=true;
    obj.setting.damage=true;
    obj.setting.bumpUp=true;
    obj.setting.ignorePickUpItems=true;        // don't pickup the weapons/ammo
    obj.setting.openDoors=true;
    
    obj.size.x=1600;
    obj.size.z=3600;
    obj.size.y=2000;
    obj.size.weight=500;
    
    obj.turnSpeed.facingWalk=1.7;
    obj.turnSpeed.motionWalk=1.6;
    obj.turnSpeed.facingAir=0.9;
    obj.turnSpeed.motionAir=0.7;
    
    obj.forwardSpeed.walk=35;
    obj.forwardSpeed.acceleration=1.0;
    obj.forwardSpeed.deceleration=1.2;
    obj.forwardSpeed.accelerationAir=0.5;
    obj.forwardSpeed.decelerationAir=0.1;

    obj.health.maximum=100;
    obj.health.start=100;
    
        // set the hilite color to green for glowing
        
    obj.model.hiliteColor.red=0;
    obj.model.hiliteColor.green=1;
    obj.model.hiliteColor.blue=0;
    
        // add weapons for JoeFoe to use
        
    obj.weapon.add('Joe Melee');
    obj.weapon.add('Joe Fire Ball');
}
So, it takes no damage at all and all projectiles just fly through it?

What the view box (the big blue one) look like? That's a "rough" box that should contain the whole model that get checked first before checking for the hit boxes (it speeds up hit checks.)

[>] Brian
funny, the leg box sticks out of the blue box slightly, but the Body and Head boxes are definatly completely inside the box.
Reference URL's