Game Development Community

Problem getting on with FPS Tutorial

by Akash · in Torque 3D Beginner · 03/11/2013 (6:28 pm) · 19 replies

According to the standard, RGB is supposed to be XYZ but the problem is:
http://www2.picturepush.com/photo/a/12394485/img/12394485.png

And this std is something i learned with Unity but now with T3D, the BLUE arrow is pointing Upwards, (which is supposed to be the "Z" or depth in the 3D world).
But if i drag the BLUE Arrow upwards, it shows that the Object's position can't be moved upwards. i tried the X and "Y" (which is shown to be depth in 3D) and they work just fine. It's the BLUE arrow/pointer, i can't change it's position UP (i mean i can't increase it's height).

I have tried changing between the "World Transform" and the "Object Transform".

Also i noticed that my Project Manager is giving me "can't find the PhysX SDK" error when creating a Project from the FPS Template. And when i start the World Editor in the FPS Tutorial(or just get in the Game), the Editor crashes, i don't know if it's a Bug or what. And i'm using the FULL Sample Project to learn Torque 3D but i have encountered problem with the RGB/XYZ Arrow.

What should i do?

Thanks

#1
03/11/2013 (7:28 pm)
slowlorris,

Nice avatar image by the way....:-) You will find that the color codes and 'standards' for tools vary from app to app. For instance, 3D max uses a different color code and such for it's app versus Blender or Maya. It's not uncommon for this to happen since there really is no 'standard' just accepted practice. (This is why certain Normal Mapping applications 'invert' the map outputs in various applications)

As for the PhysX SDK issue, I would think it has to do with what version of the SDK you are running. I know updating PhysX is in the works and since I don't use it that often, I can't tell you right now the exact version you should use. Check the docs again and ensure you are using the correct version.

Ron
#2
03/11/2013 (9:51 pm)
Oh Thanks for the reply, BTW, i love primates so ..yeah... i used it's pic and name too.. but well i'm happy with it.

Actually i don't have any SDK installed.. not even PhysX SDK.

But, could you please tell me why i can't adjust the height of the object, when i drag the Object so as to place it somewhere on the Sky(above the Ground), why does it fall back to the Ground immediately? I think it could be the Gravity, don't know where to disable it for some time but well, that's my problem, i want to move object some Torque Units above the Ground but don't know how to do it.

Thanks
#3
03/11/2013 (11:09 pm)
I added couple of other assets from the Library and it seems it's because of the rigidbody Gravity, how do i disable that for a short time?

Thanks
#4
03/11/2013 (11:11 pm)
" when i drag the Object so as to place it somewhere on the Sky(above the Ground), why does it fall back to the Ground immediately?"

disable "all objects will snap to terrians."
u will get it from menubar just next to magnet icon.


at the beginning days with t3d i did not have a internet connection.i had the same problem and it took me a 2 days to find it out.

like this u will get lots of things in t3d which is not user friendly .specially for those who already have used unity 3d.


for physX do a forum search and read.u will get the solution.
http://www.garagegames.com/community/search#gsc.q=physX sdk installation&gsc.ref=forums&gsc.tab=0

http://www.garagegames.com/community/forums/viewthread/126005
#5
03/11/2013 (11:25 pm)
Wow, thanks man, i will try that, yeah you're right, i was so damn confused, i had already started Unity Scripting Manual to learn more about it's other API functions instead.

Edit: I tried it, turns out, it's shortcut is "T" but it(the Player) falls back again to the Ground.
#6
03/12/2013 (3:22 am)
I think i know why "all objects snap to terrain" is not working, i think "above ground" created a confusion, with "above ground" in ind you showed me the way to prevent the object from passing through the terrain when i was searching for method for keeping the object floating in the air like that of Unity, i think T3d is WYSIWYP not WYSIWYG editor and its simulating the gravity for me while what i want is to have the objects to fall only when i play the Game.
"gravityMod=0" is what i have read in multiple T3d threads.

do every object in T3d come with rigidbody properties? I mean are the Assets imported with Predefined Gravity in T3d?

i am getting more confused bcz of my Unity knowledge where we have to attach rigidbody component to get physics effects.

Thanks
#7
03/12/2013 (5:50 am)
If you need to move the player, move the spawnpoint, save and reload the level. The player isn't actually saved in the scene; it is created when the scene is loaded.

Hmm, I guess if you really want to move the player around you can always select it then hit ctrl-d to drop it at the camera location - but it will fall to the ground.
#8
03/12/2013 (7:11 am)
""gravityMod=0" is what i have read in multiple T3d threads.

do every object in T3d come with rigidbody properties? I mean are the Assets imported with Predefined Gravity in T3d?
"

t3d works differently.for gravity affected objects u have to use PhysicsShape Class type object.

datablock PhysicsShapeData(defaultPhysicsShapeData) 
{
   category = "PhysicsShape"; 
   
   shapeName = "art/shapes/props/Cardboard_boxes/box_01.dae";

   mass = "1";   
   invulnerable = 1; 
   
   friction = "1";
   staticFriction = "1";
   restitution = "0.7"; 
 
   angularDamping = "0.4";
   linearDamping = "0.098";
   waterDampingScale = "10";

   linearSleepThreshold = "0.09";
   angularSleepThreshold = "0.4";
      
   buoyancyDensity = "1.1";

   ccdMotionThreshold = "0.5";
   ccdSweptSphereRadius = "0.5";
};
#9
03/12/2013 (7:41 am)
Actually, i was going through Unity style of learning and yup it's very different to me too. I don't know how the Script is attached to an Object. I don't think Drag n Drop Style of Unity will apply here either. So i will have to go through the FPS Tutorial to learn it.

>The player isn't actually saved in the scene; it is created when the scene is loaded.
Oh thanks for the info, didn't know that.

I added a simple Cube in the Scene, it did not drop to the Ground so my guess(with that test) is that the Player has Scripts with all the Physics settings and without them it would not be affected by Gravity too. I guess it's so ..is it so?
http://www4.picturepush.com/photo/a/12397877/img/12397877.png

Thanks ..

But well i have to admit it, regardless of how confused i am, i like this Engine, it's very powerful, appealing and attractive. Instead of focusing in Unity Scripting API docs (the ones) which i have not read yet, i feel like learning this Engine.
#10
03/12/2013 (7:51 am)
@slowLorris:
With regards to RGB and XYZ, that is indeed how Torque 3D's axis gizmo is set up. The x axis is red, y axis is green, and z axis is blue. What might be causing you some confusion is that T3D's world orientation is different than what you're used to from another application.

As for PhysX, if you want to recompile a T3D project that is set up to make use of it, you will have to download and install the PhysX SDK on your machine. You can read how to do that here: github.com/GarageGames/Torque3D/wiki/Creating-a-New-Project-Based-on-a-Template

- Dave
#11
03/12/2013 (7:56 am)
Thank you, but it might seem like an answered question already but, i'm still confused about this:
In the T3D Engine, if we intend to use effects such as Gravity, there's no Setting/s for it in the Inspector or anywhere in the Editor and we need to use Script for them, right?

Thanks
#12
03/13/2013 (1:07 am)
I installed the PhysX SDK and when i try to open the World Editor, it crashes when it starts loading the Assets.
#13
03/13/2013 (5:26 am)
What does the log say? "It crashes" is a very vague description....
#14
03/13/2013 (11:51 pm)
Thanks,

I'm fairly new, so i guess you meant ~ console log, so if that's it then this is what i got in the ~ Console:
http://www5.picturepush.com/photo/a/12409513/img/12409513.jpg

Also, i works normal IF i choose the NO assets Level(leftmost one), i hope you understand what i mean.

#15
03/14/2013 (8:47 am)
There is a console.log file in your <project>/game folder - it contains the entire log, as opposed to just what fits in one "screen-full". It's handy for tracking down issues - unless of course the engine crashes before the console is initialized (happens rarely).

Just wondering, did you rebuild the engine after installing the PhysX SDK?

Those errors with findFirstFile() should be harmless - the folder is empty anyway, even on the non-PhysX projects.

Anyway, does it crash if you simply play the level from the main menu? I would expect it to, but it's better to ask. I'm wondering if it's a failure in the editor tools to correctly handle PhysX objects, or if they're just not loading properly in general.
#16
03/19/2013 (8:04 am)
Okay, let's forget the FPS Tutorial for a minute ..

1. The Trigger Object doesn't trigger(the CallBack functions are not called) when i shoot at the trigger object space during the Gameplay(they work if the player passes through though), does this mean that no Bullet is fired(the bullet is not INSTANTIATEd) from the Rifle(I mean the Bullet Effects are just effects in the FULL Template -- with no "shapeFile" actually being thrown) ??

2. What's the difference between appending exec("./some_script"); in the Game/Scripts/main.cs, Game/Scripts/Client/init.cs and Game/Scripts/Server/init.cs?

Please correct me if i'm wrong here, my guess is:
-> the main.cs is used for loading Scripts in case where the Game is not multiplayer + the script is to be launched without any download/otherwise.
-> the Client/init.cs is used in case the Game is multiplayer and the script is to be loaded in a Client PC and Server/init.cs if the Script is to be launched from sort of Server side ..
Is it so?

Thanks
#17
03/19/2013 (1:49 pm)
Well, yeah - triggers don't detect projectiles. Look in source for the triggers for collision masks.
#18
03/20/2013 (8:57 am)
Thanks,

What's the difference in including script files (exec("./some_script");) in the Game/Scripts/main.cs instead of Game/Scripts/Client/init.cs and/or Game/Scripts/Server/init.cs?
#19
03/20/2013 (12:46 pm)
It depends on the script - datablocks need to load in a certain order and should be handled carefully. Most other things you just try to include where they would logically belong. If you don't need it yet, why are you dumping it here? This way your scripts are grouped in a more logical fashion - and added when needed instead of haphazardly or just right at the beginning.

You also have to realize that executing a script loads a file, parses it, compiles it and registers several things in the engine - this all takes time for each script, so loading it closer to where you use it helps to spread load time out.

Of course, you're free to do it however you feel most comfortable but I hope you'll take some of this to heart - it might save you some trouble down the road.