Camera mocement code
by arteria3d · in Torque Game Engine · 12/22/2004 (7:17 am) · 67 replies
Which script actually contains the movement code for the camera - i.e. when keys are pressed it moves the camera. I want to know this as i wish to have a go at implementing some swim code, and i will need to use this camera move code to be able to do this. I have looked in camera.cs but i cannot see commands such as 'if w key pressed. then move camera..... etc.
Also how would i disable the editor functions in my finished game?? i.e. All the F functions?
Okay i may want the game to have an editor, but i want to know how i disable stuff like this
Cheers
Steve
Also how would i disable the editor functions in my finished game?? i.e. All the F functions?
Okay i may want the game to have an editor, but i want to know how i disable stuff like this
Cheers
Steve
About the author
Owner of uk based Ltd company ArteriaMediaLtd. with a trading name of Arteria3d Website;arteria3d.com
#22
12/27/2004 (1:38 pm)
Further research in engine code using the word "fly" searching through camera.cc you findQuote:void Camera::setFlyMode()
{
mode = FlyMode;
if(bool(mOrbitObject)) {
clearProcessAfter();
clearNotify(mOrbitObject);
}
mOrbitObject = NULL;
}
#23
so now I looked for "2" and mode comparissons...
found these two in camera.cc
under interpolateTick
and
processTick
12/27/2004 (1:49 pm)
In camera.h I find Quote:enum
{
StationaryMode = 0,
FreeRotateMode = 1,
FlyMode = 2,
OrbitObjectMode = 3,
OrbitPointMode = 4,
CameraFirstMode = 0,
CameraLastMode = 4
};
so now I looked for "2" and mode comparissons...
found these two in camera.cc
under interpolateTick
if(mode == OrbitObjectMode || mode == OrbitPointMode)
{
if(mode == OrbitObjectMode && bool(mOrbitObject))
{
// If this is a shapebase, use its render eye transform
// to avoid jittering.
GameBase *castObj = mOrbitObject;
ShapeBase* shape = dynamic_cast<ShapeBase*>(castObj);
if( shape != NULL ) {
MatrixF ret;
shape->getRenderEyeTransform( &ret );
mPosition = ret.getPosition();
} else {
// Hopefully this is a static object that doesn't move,
// because the worldbox doesn't get updated between ticks.
mOrbitObject->getWorldBox().getCenter(&mPosition);
}
}
setPosition(mPosition, rot);
validateEyePoint(1.0f, &mObjToWorld);
}
else {
Point3F pos = delta.pos + delta.posVec * dt;
setPosition(pos,rot);
}and
processTick
if(mode == OrbitObjectMode || mode == OrbitPointMode)
{
if(mode == OrbitObjectMode && bool(mOrbitObject)) {
// If this is a shapebase, use its render eye transform
// to avoid jittering.
GameBase *castObj = mOrbitObject;
ShapeBase* shape = dynamic_cast<ShapeBase*>(castObj);
if( shape != NULL ) {
MatrixF ret;
shape->getRenderEyeTransform( &ret );
mPosition = ret.getPosition();
} else {
// Hopefully this is a static object that doesn't move,
// because the worldbox doesn't get updated between ticks.
mOrbitObject->getWorldBox().getCenter(&mPosition);
}
}
setPosition(mPosition, mRot);
validateEyePoint(1.0f, &mObjToWorld);
pos = mPosition;
}
else
{
// Update pos
bool faster = move->trigger[0] || move->trigger[1];
F32 scale = mMovementSpeed * (faster + 1);
mObjToWorld.getColumn(3,&pos);
mObjToWorld.getColumn(0,&vec);
pos += vec * move->x * TickSec * scale;
mObjToWorld.getColumn(1,&vec);
pos += vec * move->y * TickSec * scale;
mObjToWorld.getColumn(2,&vec);
pos += vec * move->z * TickSec * scale;
setPosition(pos,mRot);
}
#24
the flyMode would be kicked to "else" I'd assume
Note... this all was gathered using Notepad and Wordpad on a work machine in 20-30 minutes... and I've never looked at camera.cc or camera.h before
12/27/2004 (1:51 pm)
These seem to just say whether or not the camera's position is set around an object or not...the flyMode would be kicked to "else" I'd assume
Note... this all was gathered using Notepad and Wordpad on a work machine in 20-30 minutes... and I've never looked at camera.cc or camera.h before
#25
default.bind.cs
---
12/27/2004 (1:53 pm)
For exact move keysdefault.bind.cs
---
moveMap.bind( keyboard, a, moveleft ); moveMap.bind( keyboard, d, moveright ); moveMap.bind( keyboard, w, moveforward ); moveMap.bind( keyboard, s, movebackward );
#26
searching for movement actions... [sarcasm] in a surprising place [/sarcasm]
moveManager.h
12/27/2004 (2:14 pm)
Same... default.bind.csfunction moveleft(%val)
{
$mvLeftAction = %val * $movementSpeed;
}
function moveright(%val)
{
$mvRightAction = %val * $movementSpeed;
}
function moveforward(%val)
{
$mvForwardAction = %val * $movementSpeed;
}
function movebackward(%val)
{
$mvBackwardAction = %val * $movementSpeed;
}searching for movement actions... [sarcasm] in a surprising place [/sarcasm]
moveManager.h
class MoveManager
{
public:
static F32 mForwardAction;
static F32 mBackwardAction;
static F32 mUpAction;
static F32 mDownAction;
static F32 mLeftAction;
static F32 mRightAction;
static bool mFreeLook;
static F32 mPitch;
static F32 mYaw;
static F32 mRoll;
static F32 mPitchUpSpeed;
static F32 mPitchDownSpeed;
static F32 mYawLeftSpeed;
static F32 mYawRightSpeed;
static F32 mRollLeftSpeed;
static F32 mRollRightSpeed;
static U32 mTriggerCount[MaxTriggerKeys];
static U32 mPrevTriggerCount[MaxTriggerKeys];
static void init();
};
#27
Man I am so sick of your every argument being a DB vs TGE comparison. If DB was so great, GO BACK TO IT. Obviously the DB manual wasn't so great, or you wouldn't be here. And since everyone else here is to nice to tell you the truth, I'll tell it to you...
If you had a clue what you were doing you could take any script or source file and READ IT LIKE A BOOK. When I need to know exactly what makes a scripted function work I open the SDK code and run a search for that function, then I follow it's path and functionality till I completly grasp it's logic and flow from start to finish. How did I learn to do that? By just doing it. I have yet to see any document compete with just studying the source itself in nearly anything I have ever dealt with. And with all the experience, time, and dedication you claim to have had for DB, I'm surprised you can't grasp this concept.
12/27/2004 (2:34 pm)
Quote:3 years.... so the blitz guide or db pro guide took 3 years... What do u think i am asking for.
Man I am so sick of your every argument being a DB vs TGE comparison. If DB was so great, GO BACK TO IT. Obviously the DB manual wasn't so great, or you wouldn't be here. And since everyone else here is to nice to tell you the truth, I'll tell it to you...
If you had a clue what you were doing you could take any script or source file and READ IT LIKE A BOOK. When I need to know exactly what makes a scripted function work I open the SDK code and run a search for that function, then I follow it's path and functionality till I completly grasp it's logic and flow from start to finish. How did I learn to do that? By just doing it. I have yet to see any document compete with just studying the source itself in nearly anything I have ever dealt with. And with all the experience, time, and dedication you claim to have had for DB, I'm surprised you can't grasp this concept.
#28
12/27/2004 (5:14 pm)
*agrees with Gonzo* lol I found that in just over half an hour, while at work, using notepad and wordpad... not even a compiler... I don't buy that you put as much effort into looking for it as you claim
#29
wouldn\\\'t be here.'
U used this same line when u had a go at me on the light forumn - If u take time to read my post - i am here for one reason - because DB PRO lacks the performance of torque - which i clearly indicate. Please read my post before having 'another go at me ' Iam sick and tired of people like u having a go at me - so in future just dont reply to my posts please if u cant say anthing contructive
12/27/2004 (10:50 pm)
Gonzo - your line 'Obviously the DB manual wasn\\\'t so great, or youwouldn\\\'t be here.'
U used this same line when u had a go at me on the light forumn - If u take time to read my post - i am here for one reason - because DB PRO lacks the performance of torque - which i clearly indicate. Please read my post before having 'another go at me ' Iam sick and tired of people like u having a go at me - so in future just dont reply to my posts please if u cant say anthing contructive
#30
12/28/2004 (12:37 am)
The mantra at GG is, "If you can't say something nice, don't say something at all." (Also, lots of horse sedatives.)
#31
ROTFL, That was a good one Ben.
@ stevie - Not a problem dude, I will refrain from responding to you in any way shape or form. Good luck to you.
12/28/2004 (4:40 am)
"(Also, lots of horse sedatives.)"ROTFL, That was a good one Ben.
@ stevie - Not a problem dude, I will refrain from responding to you in any way shape or form. Good luck to you.
#32
People should never make assumptions. I could crititise you till the end of days on how you always approach my forumn topics and why am i constaly under fire from people like yourself. I will tell you why, cos i speak up for myself and dont constantly apologise for not knowing this or not knowing that. It seems all newbies on these forumns mention the word 'Sorry' at least 3 times in there qestions and constantly apologise for questions they are asking. And why is this - well its because they have looked at the grilling other newbies have gotten from the likes of yourself and feel they have to apologise first. So know i will never be a quiet forumn member when i am under fire.. never i say. I will defend newbies against the crossfire from answers people like u give.
Its not good you know or clever to think you have an upper hand with newbies - and it certainly doesnt make you look good either. But i suppose a clown knows best.....
12/28/2004 (4:51 am)
Gonzo - i just wished people like u would credit newbies with a bit more respect. Time and Time again i see here on these forumns, a lot of people who will help, but a lot of people who are always ready to jump down peoples throats. it seems there are people here who just scour the forumns to find the next newbie, who dares to ask a question, or dares to say something that he might get criticised for. Believe me, i reckon over the past month there is nobody who has spent the ammount of tiime and effort i have put into torque. We are talking of at least 10hrs a day, staying up very late to learn Torque, cos i have time off right now from my work. Granted i have spent a lot of time on the editors and making my scene, but as i havent come from a C orientated background i do find it hard to grasp which .cs liknks with the next .cs etc and which functions work with directly with the next one and so on - but please do not criticise me for not looking.People should never make assumptions. I could crititise you till the end of days on how you always approach my forumn topics and why am i constaly under fire from people like yourself. I will tell you why, cos i speak up for myself and dont constantly apologise for not knowing this or not knowing that. It seems all newbies on these forumns mention the word 'Sorry' at least 3 times in there qestions and constantly apologise for questions they are asking. And why is this - well its because they have looked at the grilling other newbies have gotten from the likes of yourself and feel they have to apologise first. So know i will never be a quiet forumn member when i am under fire.. never i say. I will defend newbies against the crossfire from answers people like u give.
Its not good you know or clever to think you have an upper hand with newbies - and it certainly doesnt make you look good either. But i suppose a clown knows best.....
#33
If you can't read them, there's no point in working with the engine really. So, first steps would be to get a good fundamental knowledge of the engine and C++ in general. Grab Ken's book and kick back for a long read. When someone told me "It's in there... go look for it." I didn't take offense -- I went and searched, dug into the code, broke things along the way, fixed them and eventually found what I wanted.
The biggest thing is to shoot for a low bar first time out. Problem is, most people think "I have this engine that made Tribes II and I'm going to make the next great AAA title!" It takes baby steps to get anywhere. The sum of those baby steps will eventually be a giant leap, and you'll be off to making a great new game.
Research, research, research... That's a huge thing. I can't stress it enough. Begging for help should be a last resort. Oh, and the quickest way to shut the door on future help is to slam another member personally. If you do that to someone that people respect, you can expect no further help. There are names that get tossed around in private chat rooms that are made fun of. We laugh at their ignorance and hope they will go away. Do you want to be one of those people? Probably not...
So, chill out and dig in. You'll find what you're looking for. I know right where it is and how you could get your results. In fact, I prototyped it while reading this thread. But I don't plan on sharing it with you or making it a resource. Don't even ask. I'll offer pointers if you want, but you have to work to gain respect.
- Brett
12/28/2004 (5:23 am)
But newbies have to do the exact same thing that us experienced people did back when we were newbies... And most people just don't get it, it would seem. I asked questions of people when I couldn't find the answers myself. I wasn't just looking at the script source, though. I also plowed into the game source. That's the important thing: Being able to read C++ and CS code.If you can't read them, there's no point in working with the engine really. So, first steps would be to get a good fundamental knowledge of the engine and C++ in general. Grab Ken's book and kick back for a long read. When someone told me "It's in there... go look for it." I didn't take offense -- I went and searched, dug into the code, broke things along the way, fixed them and eventually found what I wanted.
The biggest thing is to shoot for a low bar first time out. Problem is, most people think "I have this engine that made Tribes II and I'm going to make the next great AAA title!" It takes baby steps to get anywhere. The sum of those baby steps will eventually be a giant leap, and you'll be off to making a great new game.
Research, research, research... That's a huge thing. I can't stress it enough. Begging for help should be a last resort. Oh, and the quickest way to shut the door on future help is to slam another member personally. If you do that to someone that people respect, you can expect no further help. There are names that get tossed around in private chat rooms that are made fun of. We laugh at their ignorance and hope they will go away. Do you want to be one of those people? Probably not...
So, chill out and dig in. You'll find what you're looking for. I know right where it is and how you could get your results. In fact, I prototyped it while reading this thread. But I don't plan on sharing it with you or making it a resource. Don't even ask. I'll offer pointers if you want, but you have to work to gain respect.
- Brett
#34
Hope the snippets I posted helped and If you need any other assistance your welcome to ask... though you have the scripts, you have the code, so the sky is the limit... Theres more documentation out there than you would claim, it just takes a bit more effort to gather it in and know where to pull from... forum searching is a life saver
12/28/2004 (5:34 am)
Sorry for that last bit there Stevie... though I still pretty much agree with Gonzo I was trying to be productive even if a bit questioning...Hope the snippets I posted helped and If you need any other assistance your welcome to ask... though you have the scripts, you have the code, so the sky is the limit... Theres more documentation out there than you would claim, it just takes a bit more effort to gather it in and know where to pull from... forum searching is a life saver
#35
I now realise that these forumns are full of people like Sheep - who follow the ones in the know, and have respect for them, no matter how much they call other people and newbies in particular.
I feel the underdog in all this, as if i shouldnt be asking, or talking here. And please note the area of my TOPIC - hmmm.. GETTING STARTED THREAD.
This is why i place my questions here - cos its for GETTING STARTED....
I am sick, tired and fed up of starting a thread, and ending it with a war - so no more more comments here from me.
i cant wait till i know TGE inside and out, i tell yer - i will be helping as many newbies as i can, whatever there problems and no matter how many times they ask - i shall make it a mission to help them to no end - without making them feel bad or having to apologise.
Crazy, totalaly crazy.
12/28/2004 (5:34 am)
At this point right now... i aint bothered whether i get criticised, called on the IRC or what. If u look back to the beginning of this forumn thread - there was no abuse any where at all - just questions and debate. Gonzo kicked in, and i feel had a go at me - and now you are saying that in affect i am wrong to have a go and i should chill. It wasnt me who kicked the dust in the storm mate.....I now realise that these forumns are full of people like Sheep - who follow the ones in the know, and have respect for them, no matter how much they call other people and newbies in particular.
I feel the underdog in all this, as if i shouldnt be asking, or talking here. And please note the area of my TOPIC - hmmm.. GETTING STARTED THREAD.
This is why i place my questions here - cos its for GETTING STARTED....
I am sick, tired and fed up of starting a thread, and ending it with a war - so no more more comments here from me.
i cant wait till i know TGE inside and out, i tell yer - i will be helping as many newbies as i can, whatever there problems and no matter how many times they ask - i shall make it a mission to help them to no end - without making them feel bad or having to apologise.
Crazy, totalaly crazy.
#36
Sometimes, when people ask questions, it's because they don't know what it is there looking for.
When I came here, it was to refresh myself on some C++ while keeping it interesting.
People use engines to make games because they don't always have the time to make one themselves. Some big engines don't even give you the source code. So why should you expect them to read it if they think they can do what they want in script? The documentation is good but it could be better. The searches could be more relevent. This could be this that could be that. Blah blah blah.
So people ask questions? If you don't like it, don't answer it. Theres a couple people on this thread in particular.
Why do so many people feel the need to be so abrupt? Not everything comes easy to some as it does to others.
IF you don't believe me, take your right hand and make a circle. Take your left index finger and put it in the circle. Easy huh? Ask a two year old to do it.
So what, your smart. Do something productive with it. Stop trying to make other people feel stupid.
Thats about all I have to say about that
12/28/2004 (5:36 am)
Not everyone has the time to spend months looking at source code. Some people are here to learn at there own pace, in there own style. Sometimes, when people ask questions, it's because they don't know what it is there looking for.
When I came here, it was to refresh myself on some C++ while keeping it interesting.
People use engines to make games because they don't always have the time to make one themselves. Some big engines don't even give you the source code. So why should you expect them to read it if they think they can do what they want in script? The documentation is good but it could be better. The searches could be more relevent. This could be this that could be that. Blah blah blah.
So people ask questions? If you don't like it, don't answer it. Theres a couple people on this thread in particular.
Why do so many people feel the need to be so abrupt? Not everything comes easy to some as it does to others.
IF you don't believe me, take your right hand and make a circle. Take your left index finger and put it in the circle. Easy huh? Ask a two year old to do it.
So what, your smart. Do something productive with it. Stop trying to make other people feel stupid.
Thats about all I have to say about that
#37
12/28/2004 (5:37 am)
Btw there are already water states... though they don't grant you free movement (as in swimming) ... so looking up the code that hinders you in water, that calculates the waters density vs. player density is a good way to find out how it recognizes your 'in' water.
#38
I just thankyou for seeing how i see it - people spend more time typing out comments to embarass the 'not so confident and lacking knowledge' - rather than helping them. If people dont like what i type - correct.... dont reply!!
I feel more sane now... someone is seeing it my way
Thanks mate
Steve
12/28/2004 (5:43 am)
Thankyou Charlie for seeing a side from my perspective. Your bang on right when u said about the editor and scripting. TGE promotes itself as being an 'engine' that people can use script to a degree without ever having to touch the source code.I just thankyou for seeing how i see it - people spend more time typing out comments to embarass the 'not so confident and lacking knowledge' - rather than helping them. If people dont like what i type - correct.... dont reply!!
I feel more sane now... someone is seeing it my way
Thanks mate
Steve
#39
1) Ignore Gonzo's tone/method, he goes off on people totally on the forums about once every 3-6 months for some reason, never have figured it out. Most of the time he is pretty helpful!
2) Listen to, and understand the points made by not only Gonzo, but others as well.
As you know, I've responded in some cases to you in a poor manner, mostly because I felt that over a period of time discussing several questions, it seemed as if you didn't do the background research related to your question prior to coming to the boards and asking it. Especially when you were given suggestions as to where to look, or how to advance in handling your issue, without specific and detailed descriptions of the solution, you seem overall to not take the time to research either your questions or the answers provided you.
I was researching a question regarding a problem I'm having this morning. Search terms didn't work well ("getheight", "getHeight", "setheight", and "setHeight" returned zero responses, so I wound up having to search on "terrain" in the forums and sifting through the literally hundreds of posts)--and you know what I noticed? At least 5 questions from you, and probably more.
That in itself is fine, that's what forums are for--helping you along with questions that you haven't been able to figure out. However, I noticed a couple of things as well that reinforced why I think a lot of the experienced people get frustrated easily with some community members:
A) In just about every case, it become very clear that you hadn't looked at the code itself, and/or spent time finding examples in scripts of how your solution had been solved by others.
B) When you were given suggestions as to where to look, you tended to almost always ignore them, and either continue the question in that thread, or move it to another thread.
These types of things frustrate experienced community members to no end, mostly because over a long period of time, you see it again and again as new members join, muck around for a while, and then drop off the face of the earth because they find out that making games (specifically with TGE, but also in general) is extremely hard work.
What that in turn does is basically set experienced members up in a scenario where they get a feel for the amount of research particular users tend to do prior to asking questions,and in many cases blatently ignore (or react aggressively) to the members that have a history of not researching well.
Why? Because it takes a lot of time to properly answer questions. A "good" answer normally means that you have either handled the exact question previously, or are willing to take the time to research not only the question, but the answer itself to make sure you are providing accurate information. And experienced members quickly become jaded about doing that research (I've been there myself many times), and either ignore the post completely, or provide partial solutions, or simply suggestions about where to look.
Commendable attitude, I agree completely! You'll also never get any work done on your own project, because you will run into the exact same scenarios going on now. Not only that, but you will quickly adopt the exact same jaded perspective as the current set of experienced members have--I know, because I've watched it happen with not only myself, but others as well!
12/28/2004 (5:48 am)
@Stevie: Man, having run into the same general issue with a couple of your posts, here is my perspective:1) Ignore Gonzo's tone/method, he goes off on people totally on the forums about once every 3-6 months for some reason, never have figured it out. Most of the time he is pretty helpful!
2) Listen to, and understand the points made by not only Gonzo, but others as well.
As you know, I've responded in some cases to you in a poor manner, mostly because I felt that over a period of time discussing several questions, it seemed as if you didn't do the background research related to your question prior to coming to the boards and asking it. Especially when you were given suggestions as to where to look, or how to advance in handling your issue, without specific and detailed descriptions of the solution, you seem overall to not take the time to research either your questions or the answers provided you.
I was researching a question regarding a problem I'm having this morning. Search terms didn't work well ("getheight", "getHeight", "setheight", and "setHeight" returned zero responses, so I wound up having to search on "terrain" in the forums and sifting through the literally hundreds of posts)--and you know what I noticed? At least 5 questions from you, and probably more.
That in itself is fine, that's what forums are for--helping you along with questions that you haven't been able to figure out. However, I noticed a couple of things as well that reinforced why I think a lot of the experienced people get frustrated easily with some community members:
A) In just about every case, it become very clear that you hadn't looked at the code itself, and/or spent time finding examples in scripts of how your solution had been solved by others.
B) When you were given suggestions as to where to look, you tended to almost always ignore them, and either continue the question in that thread, or move it to another thread.
These types of things frustrate experienced community members to no end, mostly because over a long period of time, you see it again and again as new members join, muck around for a while, and then drop off the face of the earth because they find out that making games (specifically with TGE, but also in general) is extremely hard work.
What that in turn does is basically set experienced members up in a scenario where they get a feel for the amount of research particular users tend to do prior to asking questions,and in many cases blatently ignore (or react aggressively) to the members that have a history of not researching well.
Why? Because it takes a lot of time to properly answer questions. A "good" answer normally means that you have either handled the exact question previously, or are willing to take the time to research not only the question, but the answer itself to make sure you are providing accurate information. And experienced members quickly become jaded about doing that research (I've been there myself many times), and either ignore the post completely, or provide partial solutions, or simply suggestions about where to look.
Quote:i cant wait till i know TGE inside and out, i tell yer - i will be helping as many newbies as i can, whatever there problems and no matter how many times they ask - i shall make it a mission to help them to no end - without making them feel bad or having to apologise.
Commendable attitude, I agree completely! You'll also never get any work done on your own project, because you will run into the exact same scenarios going on now. Not only that, but you will quickly adopt the exact same jaded perspective as the current set of experienced members have--I know, because I've watched it happen with not only myself, but others as well!
#40
PlayerData::PlayerData()
which is then loaded from the datablock
in player.cc
Player::updateMove(const Move* move)
further down
12/28/2004 (5:54 am)
In player.ccPlayerData::PlayerData()
maxUnderwaterForwardSpeed = 10; maxUnderwaterBackwardSpeed = 10; maxUnderwaterSideSpeed = 10;
which is then loaded from the datablock
in player.cc
Player::updateMove(const Move* move)
if (mState == MoveState && mDamageState == Enabled)
{
zRot.getColumn(0,&moveVec);
moveVec *= move->x;
VectorF tv;
zRot.getColumn(1,&tv);
moveVec += tv * move->y;
// Clamp water movement
if (move->y > 0)
{
if( mWaterCoverage >= 0.9 )
moveSpeed = getMax(mDataBlock->maxUnderwaterForwardSpeed * move->y,
mDataBlock->maxUnderwaterSideSpeed * mFabs(move->x));
else
moveSpeed = getMax(mDataBlock->maxForwardSpeed * move->y,
mDataBlock->maxSideSpeed * mFabs(move->x));
}
else
{
if( mWaterCoverage >= 0.9 )
moveSpeed = getMax(mDataBlock->maxUnderwaterBackwardSpeed * mFabs(move->y),
mDataBlock->maxUnderwaterSideSpeed * mFabs(move->x));
else
moveSpeed = getMax(mDataBlock->maxBackwardSpeed * mFabs(move->y),
mDataBlock->maxSideSpeed * mFabs(move->x));
}
// Cancel any script driven animations if we are going to move.
if (moveVec.x + moveVec.y + moveVec.z != 0 &&
(mActionAnimation.action >= PlayerData::NumTableActionAnims
|| mActionAnimation.action == PlayerData::LandAnim))
mActionAnimation.action = PlayerData::NullAnimation;
}
else
{
moveVec.set(0,0,0);
moveSpeed = 0;
}further down
if (!isGhost()) {
// Vehicle Dismount
if(move->trigger[2] && isMounted())
Con::executef(mDataBlock,2,"doDismount",scriptThis());
if(!inLiquid && mWaterCoverage != 0.0f) {
Con::executef(mDataBlock,4,"onEnterLiquid",scriptThis(), Con::getFloatArg(mWaterCoverage), Con::getIntArg(mLiquidType));
inLiquid = true;
}
else if(inLiquid && mWaterCoverage == 0.0f) {
Con::executef(mDataBlock,3,"onLeaveLiquid",scriptThis(), Con::getIntArg(mLiquidType));
inLiquid = false;
}
}
else {
if(!inLiquid && mWaterCoverage >= 1.0f) {
inLiquid = true;
}
else if(inLiquid && mWaterCoverage < 0.8f) {
if(getVelocity().len() >= mDataBlock->exitSplashSoundVel && !isMounted())
alxPlay(mDataBlock->sound[PlayerData::ExitWater], &getTransform());
inLiquid = false;
}
}
Torque 3D Owner Matthew Langley
Torque
I would then try and find 'serverCmdToggleCamera'
which I found in commands.cs under server/scripts