Game Development Community

Shaky Camera

by Tim Tebow · in General Discussion · 04/21/2007 (8:17 am) · 6 replies

Hey guys,

First off wanted to thank the community for all the help you've already given but now onto a new question :)

For some reason when I jump off something pretty high my camera shakes a bunch when I hit the ground. Now when I play any of the other torque games that have been made it does not do that anyone have any ideas on how to change this? Ive looked in all the .cs files but really have not found anything that would change that.

Thanks

#1
04/22/2007 (4:36 pm)
Quoting Ian Roach from the "Player Dropping" thread:

Quote:
In your player script file have a look for the following datablock settings

groundImpactMinSpeed = 10.0;
groundImpactShakeFreq = "4.0 4.0 4.0";
groundImpactShakeAmp = "1.0 1.0 1.0";
groundImpactShakeDuration = 0.8;
groundImpactShakeFalloff = 10.0;

i believe these are what control the shake duration and amount
I won't take credit for it. Ian was the one who wrote it.
#2
04/22/2007 (7:10 pm)
Yes that worked perfect I also let him know that! Ty for the help though!
Thanks
#3
08/07/2007 (10:32 pm)
Ok guys im about to sound like a complete noob! I obviously figured this problem out befor as you can see my post above shows so. I went and checked out Ian's profile not only do I see any post that contains "Player Dropping" as a thread but ive scoured the tdn / forumns for anything containing those lines of code he/she posted above.

But ive gone threw every line of every script in the tutorial.base folder / client / server / data folders looking for those lines and have yet to find them to change it so the camera dont shake. What script is it? my player script which is only located in the server folder contains very limited information which is the following :

//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------

// Load dts shapes and merge animations
datablock TSShapeConstructor(PlayerDts)
{
baseShape = "~/data/shapes/player/player.dts";
sequence0 = "~/data/shapes/player/player_root.dsq root";
sequence1 = "~/data/shapes/player/player_forward.dsq run";
sequence2 = "~/data/shapes/player/player_back.dsq back";
sequence3 = "~/data/shapes/player/player_side.dsq side";
sequence4 = "~/data/shapes/player/player_fall.dsq fall";
sequence5 = "~/data/shapes/player/player_land.dsq land";
sequence6 = "~/data/shapes/player/player_jump.dsq jump";
sequence7 = "~/data/shapes/player/player_standjump.dsq standjump";
sequence8 = "~/data/shapes/player/player_lookde.dsq look";
sequence9 = "~/data/shapes/player/player_head.dsq head";
sequence10 = "~/data/shapes/player/player_headside.dsq headside";
sequence11 = "~/data/shapes/player/player_celwave.dsq celwave";
};

datablock PlayerData(PlayerBody)
{
renderFirstPerson = false;
shapeFile = "~/data/shapes/player/player.dts";
};


//----------------------------------------------------------------------------
// PlayerBody Datablock methods
//----------------------------------------------------------------------------

function PlayerBody::onAdd(%this,%obj)
{
// Called when the PlayerData datablock is first 'read' by the engine (executable)
}

function PlayerBody::onRemove(%this, %obj)
{
if (%obj.client.player == %obj)
%obj.client.player = 0;
}


as you can see nothing in there... Again I obviously fixed the problem befor but I am at a loss right now haha.

Any help would be nice just a tip even in the right direction. I dont mind reading / studing. In the TDN I only found even 1 remotely helpfull page which only showed what each function did which was pulled out of the The Game Programmer's Guide to Torque.


Thanks
#4
08/07/2007 (10:47 pm)
Hey austin, oddly enough i cant find that Player Dropping thread anymore either :)

I have those impact details setup in the server/player.cs file , under the PlayerData datablock.

Are you still getting shaking despite not having them declared ?
#5
08/07/2007 (11:56 pm)
Yeah still getting the shacky effect. Im just lost for thoughts right now. I clearly remeber them being there I havnt uninstalled or installed anything new so NOTHING should have changed all of the sudden they disapear haha. I will try to declare them and see what happens.
#6
08/08/2007 (12:04 am)
Well adding those

"
groundImpactMinSpeed = 10.0;
groundImpactShakeFreq = "4.0 4.0 4.0";
groundImpactShakeAmp = "1.0 1.0 1.0";
groundImpactShakeDuration = 0.1;
groundImpactShakeFalloff = 10.0;
"

to it fixed the problem just really odd it wasnt in there like it was suppose to be.

Ian thanks for the response and nice to see your still active part of the community :)

Thanks