Camera Shake
by Howard Dortch · in Torque Game Engine · 03/02/2006 (12:02 pm) · 4 replies
In V1.3 when I got shot, the camera would shake. Same code in V1.4 I get no shake.
#2
datablock ExplosionData(BotRifleExplosion)
{
particleEmitter = BotRifleExplosionEmitter;
particleDensity = 40;
particleRadius = 0.15;
faceViewer = true;
explosionScale = "1 1 1";
shakeCamera = true;
camShakeFreq = "10.0 11.0 10.0";
camShakeAmp = "1.0 1.0 1.0";
camShakeDuration = 1.5;
camShakeRadius = 10.0;
};
03/02/2006 (12:33 pm)
Not sure what you want, this is the explosion defined in BotRifle datablock. Works fine in 1.3datablock ExplosionData(BotRifleExplosion)
{
particleEmitter = BotRifleExplosionEmitter;
particleDensity = 40;
particleRadius = 0.15;
faceViewer = true;
explosionScale = "1 1 1";
shakeCamera = true;
camShakeFreq = "10.0 11.0 10.0";
camShakeAmp = "1.0 1.0 1.0";
camShakeDuration = 1.5;
camShakeRadius = 10.0;
};
#3
03/02/2006 (12:38 pm)
Ah, you do use the explosion's camShake. Search the source code in explosion.cc for the camShake stuff and see if the code is different between TGE 1.3 and 1.4.
#4
// shake camera V1.4
if( mDataBlock->shakeCamera && isClientObject() )
isClientObject() is not in the code for 1.3
03/02/2006 (1:17 pm)
There are minor differences, GameConnection* is called twice. other than that not much difference.// shake camera V1.4
if( mDataBlock->shakeCamera && isClientObject() )
isClientObject() is not in the code for 1.3
Torque Owner Chris Byars
Ion Productions
If it isn't custom, guess what, the camera doesn't shake when you get hit. (Unless by an explosion of some sort and you use camShake)