T3D1.2 Cheetah
by Ferdinand Stewart · in Torque 3D Professional · 01/15/2012 (5:02 am) · 10 replies
Hello everyone,
Quick question.
I can't seem to get the cars to work in the examples.
I'm using the China town example with UAISK.
I'm able to create the vehicles in game, but I can't seem to collide with them. My player simply walks through them as if they weren't there.
Any help would ne greatly appreciated.
Quick question.
I can't seem to get the cars to work in the examples.
I'm using the China town example with UAISK.
I'm able to create the vehicles in game, but I can't seem to collide with them. My player simply walks through them as if they weren't there.
Any help would ne greatly appreciated.
About the author
#2
I guess I forgot to mention that I am using the scripted version as oppose to the static mesh. I copied the scripts from the FPS Example from both the scripts/server and the art/datablocks/vehicles and called them from criptExec.cs and datablockExec.cs. I'm pretty sure I'm using the scripted version, because when they're inserted into the game, they fall to the ground where as the meshes just float in the air.
From the example that came with Torque, I am able to mount the vehicles.
From the example that I created, the player just walks through the mesh.
I've combed through the forums, resources, and blogs searching for anything with car, cheetah, or vehicle and have come up empty.
01/15/2012 (11:04 am)
HI MIke,I guess I forgot to mention that I am using the scripted version as oppose to the static mesh. I copied the scripts from the FPS Example from both the scripts/server and the art/datablocks/vehicles and called them from criptExec.cs and datablockExec.cs. I'm pretty sure I'm using the scripted version, because when they're inserted into the game, they fall to the ground where as the meshes just float in the air.
From the example that came with Torque, I am able to mount the vehicles.
From the example that I created, the player just walks through the mesh.
I've combed through the forums, resources, and blogs searching for anything with car, cheetah, or vehicle and have come up empty.
#3
01/16/2012 (1:58 am)
Ok, then the problem should be with the player code. Compare the player scripts. I haven't looked, (and don't have time at the moment) but I'd bet there's some collision code differences keeping you from mounting the vehicle. Sorry I can't help more. Gotta get to work.
#4
01/16/2012 (9:27 am)
The FPS Tutorial template has PhysX enabled and vehicles do not currently support PhysX.
#5
@Scott. In the FPS Example out of the example folder, I'm able to mount the vehicles and enter the bunker.
In the FPS Example I generate, the player simply walks through the vehicles and cannot enter the bunker. As if the bunker was surrounded by a force field and the vehicles weren't there.
01/17/2012 (12:13 am)
@Mike, Thanks for the help. Actually, I just copied the player scripts from the FPS Example out of the example folder. Just in case that was the problem. It wasn't.@Scott. In the FPS Example out of the example folder, I'm able to mount the vehicles and enter the bunker.
In the FPS Example I generate, the player simply walks through the vehicles and cannot enter the bunker. As if the bunker was surrounded by a force field and the vehicles weren't there.
#6
Also, check your collision settings on your buildings - changing that to "visible mesh" for both fields on buildings you want to interact correctly with should help.
And double-check your onCollision() callback on your player, armor and vehicle classes in script, though if you just copied it all over it shouldn't make a difference.
01/17/2012 (6:13 am)
Note that Scott said that "The FPS Tutorial template" has PhysX enabled. The FPS Example does not. When you generate your "FPS Example," which template are you using? If it's one of the ones that says PhysX, then vehicles will behave oddly. Essentially, you should be using the "Empty" project template for what you're attempting.Also, check your collision settings on your buildings - changing that to "visible mesh" for both fields on buildings you want to interact correctly with should help.
And double-check your onCollision() callback on your player, armor and vehicle classes in script, though if you just copied it all over it shouldn't make a difference.
#7
1; disable the players physicsRep
or
2; create and enable a physicsRep for the vehicle
either way will allow vehicle mounting in a physics build.
01/17/2012 (7:56 am)
to mount vehicles in a physics build, you will need to:1; disable the players physicsRep
or
2; create and enable a physicsRep for the vehicle
either way will allow vehicle mounting in a physics build.
#8
01/17/2012 (8:54 am)
Thanks deep! Guess we could add that to the PhysX templates some time....
#10
12/17/2015 (8:24 pm)
How do you disable the players physicsRep or create and enable a physicsRep for the vehicle? Thanks.
Torque Owner Mike Rowley
Mike Rowley
After looking, it doesn't seem to be listed, so you are definitely inserting the static version.
You'll have to add the scripts to your project.