Ejemplo n.º 1
0
static void	updateCameraPosition(UBYTE update)
{
    BOOL	bFlying;
    DROID	*psDroid;
    PROPULSION_STATS	*psPropStats;

    bFlying = false;
    if(trackingCamera.target->type == OBJ_DROID)
    {
        psDroid = (DROID*)trackingCamera.target;
        psPropStats = asPropulsionStats + psDroid->asBits[COMP_PROPULSION].nStat;
        if(psPropStats->propulsionType == PROPULSION_TYPE_LIFT)
        {
            bFlying = true;
        }
    }

    if(update & X_UPDATE)
    {
        /* Need to update position along x axis */
        trackingCamera.position.x += realTimeAdjustedIncrement(trackingCamera.velocity.x);
    }

    if(update & Y_UPDATE)
    {
        /* Need to update position along y axis */
        trackingCamera.position.y += realTimeAdjustedIncrement(trackingCamera.velocity.y);
    }

    if(update & Z_UPDATE)
    {
        /* Need to update position along z axis */
        trackingCamera.position.z += realTimeAdjustedIncrement(trackingCamera.velocity.z);
    }
}
Ejemplo n.º 2
0
/* Move the camera around by adding the velocity */
static void updateCameraRotationPosition( UBYTE update )
{
 	if (update & Y_UPDATE)
	{
		trackingCamera.rotation.y += realTimeAdjustedIncrement(trackingCamera.rotVel.y);
	}
	if (update & X_UPDATE)
	{
		trackingCamera.rotation.x += realTimeAdjustedIncrement(trackingCamera.rotVel.x);
	}
	if (update & Z_UPDATE)
	{
		trackingCamera.rotation.z += realTimeAdjustedIncrement(trackingCamera.rotVel.z);
	}
}
Ejemplo n.º 3
0
static void updateCameraVelocity(UBYTE update)
{
	if(update & X_UPDATE)
	{
		trackingCamera.velocity.x += realTimeAdjustedIncrement(trackingCamera.acceleration.x);
	}

	if(update & Y_UPDATE)
	{
		trackingCamera.velocity.y += realTimeAdjustedIncrement(trackingCamera.acceleration.y);
	}

	if(update & Z_UPDATE)
	{
		trackingCamera.velocity.z += realTimeAdjustedIncrement(trackingCamera.acceleration.z);
	}
}
Ejemplo n.º 4
0
static void	updateCameraPosition(UBYTE update)
{
	if(update & X_UPDATE)
	{
		/* Need to update position along x axis */
		trackingCamera.position.x += realTimeAdjustedIncrement(trackingCamera.velocity.x);
	}

	if(update & Y_UPDATE)
	{
		/* Need to update position along y axis */
		trackingCamera.position.y += realTimeAdjustedIncrement(trackingCamera.velocity.y);
	}

	if(update & Z_UPDATE)
	{
		/* Need to update position along z axis */
		trackingCamera.position.z += realTimeAdjustedIncrement(trackingCamera.velocity.z);
	}
}