Advance camera / T3D's Update Mov and Update player - Can a T3D dev peek in please?
by Kevin Mitchell · in Torque 3D Professional · 01/13/2010 (9:03 pm) · 7 replies
I include the class into the engine, clean all and rebuild.
Place a stop in advance camera's constructor.
Load the engine, on load i get to:
the code breaks I step through the code in the engine for the constructor then i exit and i get:
The class is there how can i not make an instance of it?
Place a stop in advance camera's constructor.
Load the engine, on load i get to:
-> Game.advCamera = new AdvancedCamera() {
dataBlock = AdvCameraData;
};
MissionCleanup.add(%this.advCamera);
Game.advCamera.scopeToClient(%this);
Game.onClientEnterGame(%this);
// We set the camera system to run in 3rd person mode around the %player
Game.advCamera.setPlayerObject(%this.player);
Game.advCamera.setOrbitMode();
//Game.advCamera.setFollowTerrainMode(false);
//Game.advCamera.setVerticalFreedomMode(false);
Game.setCameraObject(Game.advCamera);
Game.setTargetObject(%this.player);the code breaks I step through the code in the engine for the constructor then i exit and i get:
274: Unable to instantiate non-conobject class AdvancedCamera.
The class is there how can i not make an instance of it?
About the author
Riding Solo since 2005. Current Project: Fated World 2005-Present RPG Engine Tool Kit - Now available.
#2
01/13/2010 (10:19 pm)
isObject, and isFunction return 0. If thats true how can i step inside the constructor of the object.
#3
Using this resource, did anything major change from beta to now?
01/14/2010 (6:37 am)
http://www.torquepowered.com/community/resource/view/17169/2#commentsUsing this resource, did anything major change from beta to now?
#4
But I'm sure there is a T3D specific thread on the advanced camera, so you don't have to rely on a TGEA 1.7.1 related description thats basically totally outdated (the T3D in the path there does not related to Torque3D)
01/14/2010 (6:55 am)
T3D has part of that already present (orbit camera for example, among others)But I'm sure there is a T3D specific thread on the advanced camera, so you don't have to rely on a TGEA 1.7.1 related description thats basically totally outdated (the T3D in the path there does not related to Torque3D)
#5
That is why I looked towards this resource it's something that I know operates how I need it to operate. Now unless there's a way to control the orbit cam and have it target And follow the player with the ability to swivel the character at a different theta than the camera theta then I'm forced to look towards this resource.
I know they have these cameras there but I guess I lack the understanding and knowledge and understanding to get them to work like the dev's desired.
Do the dev's read these post anymore?
If so dose these camera systems give me the abilities to use separate controls for the character and a separate rotation fir the camera. I would really appreciate your responses.
Maybe the starting blocks are there but it's just not fully implemented? I've took the weekend to rip apart update move and update player. I see where you use the camera position to calculate the rotation axis.
I've tried to modify this to take the W A S D controls to define a angle to face and set the charters movement to move that way. But my problem was getting the charters theta to update to that rotation. I can manipulate the camera theta just fine but I can not just update the players rotation as it is right now. Maybe there's a different area that controls the character rotation?
If anyone can open my eyes to this I'd really love it. Thanks.
01/14/2010 (7:58 am)
I've looked and this is the more current that I have Seen for this resource I was actually trying to make sure it still works with T3D. I was told that the orbit cam and other cams are a separate control object and using the other cam only allows you to control the camera and Not the player. That is why I looked towards this resource it's something that I know operates how I need it to operate. Now unless there's a way to control the orbit cam and have it target And follow the player with the ability to swivel the character at a different theta than the camera theta then I'm forced to look towards this resource.
I know they have these cameras there but I guess I lack the understanding and knowledge and understanding to get them to work like the dev's desired.
Do the dev's read these post anymore?
If so dose these camera systems give me the abilities to use separate controls for the character and a separate rotation fir the camera. I would really appreciate your responses.
Maybe the starting blocks are there but it's just not fully implemented? I've took the weekend to rip apart update move and update player. I see where you use the camera position to calculate the rotation axis.
I've tried to modify this to take the W A S D controls to define a angle to face and set the charters movement to move that way. But my problem was getting the charters theta to update to that rotation. I can manipulate the camera theta just fine but I can not just update the players rotation as it is right now. Maybe there's a different area that controls the character rotation?
If anyone can open my eyes to this I'd really love it. Thanks.
#6
So if i delete all of the animations for forward side and back and replace it with forward animations with the translations for the desired directions?
EX:
Forward_0 {1,0,0}
Forward_45 {1,1,0}
Forward_90 {0,1,0}
Forward_135 {-1,1,0}
Forward_180 {-1,0,0}
Forward_225 {-1,-1,0}
Forward_270 {0,-1,0}
Forward_315 {1,-1,0}
Then setup my players.cs for forward animations for all the angles?
If that's how it works.
Or can i just eliminate those and just have Forward animation and anytime I have a movement then it just plays the forward animation?
... But I'd still have to figure out how to rotate the characters separately from the camera... crap...
01/14/2010 (8:18 am)
Just had another thought. Dose this get affected by the Animation Enums?So if i delete all of the animations for forward side and back and replace it with forward animations with the translations for the desired directions?
EX:
Forward_0 {1,0,0}
Forward_45 {1,1,0}
Forward_90 {0,1,0}
Forward_135 {-1,1,0}
Forward_180 {-1,0,0}
Forward_225 {-1,-1,0}
Forward_270 {0,-1,0}
Forward_315 {1,-1,0}
Then setup my players.cs for forward animations for all the angles?
If that's how it works.
Or can i just eliminate those and just have Forward animation and anytime I have a movement then it just plays the forward animation?
... But I'd still have to figure out how to rotate the characters separately from the camera... crap...
#7
04/21/2010 (12:31 pm)
Did you IMPLEMENT_CONOBJECT OR CO_NETOBJECT? Sounds like it if you are able to step through the ctor. You shouldn't be able to get to the ctor unless instantiation of the abstract type succeeded, meaning that the error you're getting is a misnomer. I had a similar problem and the cause was datablock related.
Torque Owner Kevin Mitchell
12 CatBlack Studios
DECLARE_CONOBJECT(AdvancedCamera);
Its declared as one. I'm comparing the process of adding an AI character and i nees the same stuff but AI player works fine