View Full Version : Tutorial Simple Vehicle
XxXdanceXxX
01-12-2010, 07:33 PM
Here is a start of a Step by Step Vehicle Tutorial...
UDK Vehicle Tutorial by dance
Beyond Unreal Wiki (http://wiki.beyondunreal.com/UDK/Vehicle_Tutorial)
...
Thanks to geodav and tegleg for their awesome support!!! and other's who have given their support in this thread...
Geodav's Website (https://sites.google.com/site/ut40kmod/)
Tegleg's Tutorials (http://forums.epicgames.com/threads/804767-Teglegs-Tutorials-Code-and-Stuff)
Mougli's Tutorials (http://www.moug-portfolio.info/index.php?page=tutorials)
miatribe
01-12-2010, 08:29 PM
mastering unreal tch vol 2 has some info in there about getting a truck in the game... not sure if it has what you need as iv not looked into that part myself.
XxXdanceXxX
01-12-2010, 08:36 PM
Yeah we have those 2 vol but still doesn't help...
PuckerFactor
01-12-2010, 09:50 PM
Yeah I'm banging my head against a brick wall on this to....I find that most tutorials are on how to get a vehicle into the UDK...but not on how to code it to actually work.
Geodav has excellent tutorials on rigging, skinning and texturing your vehicle for export. But once you get it into the editor you are on your own.
A lot of people say to use the UDK and UT3 vehicles as a reference...but that doesn't actually show you how it all fits together e.g the vehicle factory code and scripts, the animtree the animset and the physics editor all have to sync together. I don't think there is a tutorial that explains what to do once you get your vehicle into the editor or level.
XxXdanceXxX
01-13-2010, 10:53 AM
The best step by step Vehicle Tutorial that i have found was a Enemy Territory: QUAKE Wars Vehicle Tutorial (http://wiki.splashdamage.com/index.php/Vehicle_Tutorial) The only problem is only some of it can be used with the UDK..
D-Rez
01-13-2010, 11:43 AM
Same problem i'm facing. I've got something into the UDK editor, but with no clear guide to scripting a WHEELED vehicle, I can't see how this is going to get resolved. and because I can't finish the script, I can't even test what i've done so far to see if it's been done properly.
I'm not a programmer or good with script so I really need a lot of help on this area. I've looked at GeoDav's tutorials but replacing parts of the existing script isn't working for me - I get all sorts of compiling errors that I don't understand enough about to remedy the problem.
It all seems fragmented across dozens of seperate files, which makes this extremely complicated.
IllpIll
01-13-2010, 12:08 PM
You can look for UTVehicle_Scorpion.uc
in UDK\Development\Src\UTGame
and UTVehicle_Scorpion_Content.uc
in UDK\Development\Src\UTGameContent.
Read the code in those two files and once you understand it somewhat you will extend it with your own vehicle classes, usually named UTVehicle_MyCrappyVehicle.uc and UTVehicle_MyCrappyVehicleContent.uc.
Making references to your .upk packages with your models and textures in UTVehicle_MyCrappyVehicleContent.uc and doing most of the code on how your car handles in UTVehicle_MyCrappyVehicle.uc.
Piddu
01-13-2010, 12:51 PM
http://code.google.com/p/steam-punk-pirates-mod/wiki/TutorialPage
look at the veicle part...
I thought geodav had a complete tutorial on this? I can't access the site from here so sorry if I am mistaken.
geodav
01-13-2010, 02:39 PM
no i don't finish my vehicle tutorials due to the lack of support from the community and epic,
i may if asked carry on where i left off in UT3 and port to UDK
please be careful with the scorpian code as we had loads of problems with it in UT3
XxXdanceXxX
01-13-2010, 06:30 PM
Yeah it doesn't have to be a really complex tutorial just something simple just to get a wheeled vehicle working. A wiki would be awesome that way users can edit and comment on it.
Mokomani
01-13-2010, 09:47 PM
Have you tried going to these two links?
http://udn.epicgames.com/Three/SettingUpVehicles.html
http://udn.epicgames.com/Three/VehiclesTechnicalGuide.html
XxXdanceXxX
01-13-2010, 10:15 PM
Oh yeah i even found the old SVehicle Docs (http://udn.epicgames.com/Two/SimpleSVehicleExamples.html#Simple%20SVehicle%20Ex amples)
geodav
01-14-2010, 02:00 PM
What kind of support from the community??? I think that everyone here would appreciate a tutorial like that.
the only support/help i need is coding, in which i get ignored or get vaig answers which don't help a none coder like me
ok let me know what you need and i'll see what i can do
don't forget i'll be using the content from my UT3 wheeled vehicle video's
sdinesh86
01-14-2010, 11:20 PM
hey Geodav i would like to help you out with this if possible,
i am also writing a small document with all the procedure that i followed, what all problems i faced and how i solved it
while making this i had a specific target of racing game kinda thing
now i have my car in the camera attached to the car follows the car the mouse control is been taken off and also 3 camera set ups one from inside and 2 of them from outside with different FOV
if there is is anything i can help you with this i wold be more that happy to do that
XxXdanceXxX
01-15-2010, 02:22 AM
Why don't you guys use the Unreal Wiki (http://wiki.beyondunreal.com/UDK) that way everyone can contribute or comment...
geodav
01-15-2010, 03:19 PM
sorry "dance" but thats a hell of a lot of writing and pics would be required, i've found over the years video's are a lot better to learn from eg:- monkey see monkey do
XxXdanceXxX
01-15-2010, 08:15 PM
Ok for those having problems I started a WikiPage and uploaded our "SimpleCar" example.
I included source for the model so you can see the rig and weights note that the model is in Softimage format.
UDK Vehicle Tutorial (http://wiki.beyondunreal.com/UDK/Vehicle_Tutorial)
MagnumAI
01-16-2010, 12:55 AM
Hey Dance great idea. In training/development combining video and providing something to read/reference is the best way to learn.
XxXdanceXxX
01-16-2010, 07:07 AM
Ill just export it to several formats but don't know how much data will be exported.
XxXdanceXxX
01-16-2010, 07:31 AM
Ok added several file formats to the Project Files and uploaded it to fileplanet...
geodav
01-16-2010, 02:54 PM
glad to see you got it working in-game
XxXdanceXxX
01-16-2010, 03:47 PM
xnasorcerer, no prob
geodav, the problems we where having was with the scripts but there is no way one can tell if the problem is with model, package or scripts so it took a while.
D-Rez
01-18-2010, 07:35 AM
the problems we where having was with the scripts but there is no way one can tell if the problem is with model, package or scripts so it took a while.
Thanks for the help Dance. You and GeoDav have been really helpful so far.
I'm still having issues with scripting too though - what problems did you have with it and how did you solve them?
Like GeoDav i'm no coder, so I come crashing down when I need to deal with unrealscript, compiling, etc.
XxXdanceXxX
01-18-2010, 08:09 AM
Im no coder myself but i have a couple of friends who are and they figured out the scripting part of it.
Ill see if i can get him to post it here or on the wiki...
D-Rez
01-18-2010, 11:43 AM
Im no coder myself but i have a couple of friends who are and they figured out the scripting part of it.
Ill see if i can get him to post it here or on the wiki...
That'd be great if you could, I know quite a few people offline who are also completely confused as to why they can't get vehicles working in UDK. :)
MagnumAI
01-18-2010, 12:10 PM
@D-Rez
I modified the scripting for the vehicle.
I am at work, but will provide a quick break down. I wanted to give them a vehicle code that was working without a lot of work. So we used the Scorpion Vehicle code.
The main issue is UDK does not handle missing bones gracefully - you hear that a lot. The Scorpion code had references to bones that were not needed yet (boost, blades, ect). So if the bones and blades did not exist in the model, it simply crashed with very little acknowledgment as to why (hence not gracefully).
So the solution is add bogus nulls for bones in the model, or remove the references from the scripts. We elected to simply comment out anything in the code that was causing an issue and not needed, some I deleted all together.
I plan to go back over and create more scripts simply from svehicle as opposed to the UTVehicle_Scorpion.
While the UTvehicle scripts served their purpose in UT3, there are many different ways to implement vehicle code that can be more efficient. One thing is to include checks in the scripts so if the bones do not exist it logs an error and then ignores that feature. Not sure how to do that yet, but should not be an issue.
And yes, if I create basic scripts I will pass them along, but with my work load it may not be quick.
While there were other issues/problems they were more from user error (my errors:))
XxXdanceXxX
01-18-2010, 12:46 PM
Here is a good example of sub-groups and i think i seen geodav post (http://forums.epicgames.com/showthread.php?t=702825&highlight=group) about this somewhere as well. If you make a sub-group in your package which helps organize all the content in that package then you will need to add it in code. In the case with the Scorpion they where using sub-groups in the package and in the code. You can even see this in the browser when you look in the Scorpion package there are 4 sub-groups called Anims/Effects/Materials/Mesh.
If you wanted to arrange them by groups just click on the object and choose Move/Rename and properties box appears and just add a name in the Groups section and it will make a group of that object. But don't forget that you will need to change it in the scripts as well like the examples below.
Package.Group.NameOfObject
Package.NameOfObject
UTVehicle_Scorpion_Content.uc
Begin Object Name=SVehicleMesh
SkeletalMesh=SkeletalMesh'VH_Scorpion.Mesh.SK_VH_S corpion_001'
AnimTreeTemplate=AnimTree'VH_Scorpion.Anims.AT_VH_ Scorpion_001'
PhysicsAsset=PhysicsAsset'VH_Scorpion.Mesh.SK_VH_S corpion_001_Physics'
MorphSets[0]=MorphTargetSet'VH_Scorpion.Mesh.VH_Scorpion_Morph Targets'
AnimSets.Add(AnimSet'VH_Scorpion.Anims.K_VH_Scorpi on')
RBCollideWithChannels=(Default=TRUE,BlockingVolume =TRUE,GameplayPhysics=TRUE,EffectPhysics=TRUE,Vehi cle=TRUE,Untitled4=TRUE)
End Object
UTVehicle_Humvee_Content.uc
Begin Object Name=SVehicleMesh
SkeletalMesh=SkeletalMesh'VH_Humvee.VH_HMMWV'
AnimTreeTemplate=AnimTree'VH_Humvee.VH_HMMWV'
PhysicsAsset=PhysicsAsset'VH_Humvee.VH_HMMWV_Physi cs'
//MorphSets[0]=MorphTargetSet'VH_Scorpion.Mesh.VH_Scorpion_Morph Targets'
//AnimSets.Add(AnimSet'VH_Scorpion.Anims.K_VH_Scorpi on')
RBCollideWithChannels=(Default=TRUE,BlockingVolume =TRUE,GameplayPhysics=TRUE,EffectPhysics=TRUE,Vehi cle=TRUE,Untitled4=TRUE)
End Object
XxXdanceXxX
01-20-2010, 08:10 AM
Has everyone solved their issues?
geodav
01-20-2010, 04:02 PM
no my tracks still don't work :(
but with the rest we're getting there ;)
XxXdanceXxX
01-20-2010, 07:36 PM
geodav you working on something like tank tracks?
D-Rez
01-21-2010, 01:08 PM
Has everyone solved their issues?
Not yet - mine has to be a script issue, though i'm going back to basics and setting up a Mod Project *properly* to see if that's been the cause of the problem for me. Think my problem is i'm trying to run without learning how to walk first. :)
dance, I couldn't get the humvee to appear in my UDK (latest version) but I think that was due to my paths being incorrect/messed up. The vehicle factory and package appeared fine though.
I'm gonna crack on with it now and get it sussed ASAP with any luck. Thanks again for all the help and the test vehicle files, I really appreciate it. :)
EDIT: Yep, I got Dance's basic Humvee to work in a level - in my case it was down to directory structure problems and not sorting out a proper Mod file. Much appreciated guys, thanks! :D
geodav
01-21-2010, 02:34 PM
yep, i'm using the code from the UT3 Goliath but the track stuff is native code, seemingly the only way to get it to work is by extending off the goliath base code which i don't want to do as this means naming problems for my bones and controllers !!!! eg all the wheel stuff
XxXdanceXxX
01-21-2010, 06:16 PM
d-rez, goog to hear you got it working...
geodav, yeah having to rename everything is a pain good luck with that.
crapageddon
01-29-2010, 08:40 PM
This is turning out to be a pretty great post. I'm trying to learn to script a simple car vehicle and saw the tutorial you posted. I'm a noob to unrealScript and had a few questions. I put them in Red below after the script you posted.
http://wiki.beyondunreal.com/UDK/Vehicle_Tutorial
*************TUTORIAL EXCERPT****************
Contents: The names are different SimpleCar/Humvee/VH_HMMWV because we did not want to go back and rename everything.
If the names are different, doesn't that mean you HAVE TO rename everything?
Folder SimpleCar
Folder C.UDK.UDK.2009-12.UTGame.Content.Vehicles
File VH_Humvee.upk
Where do I put this?
Folder C.UDK.UDK-2009-12.Development.Src.MyMod.Classes
File UTVehicle_Humvee_Content.uc
File UTVehicleFactory_Humvee.uc
File UTVehicleHumvee.uc
File UTVehicleHumveeWheel.uc
Where do I put these?
Also, what is each of these files doing differently? Why not just ONE file?
Folder Humvee Export Model
File VH_HMMWV.psa
File VH_HMMWV.PSK
File X_ModelInfo_VH_HMMWV.LOG
Just import these into a new package right?
Folder Humvee Model Source
File Humbvee.ase
File Humbvee.dae
File Humbvee.fbx
File Humbvee.mtl
File Humbvee.obj
File Humbvee.xsi
File simplecartexture.bmp
Thanks again for doing all of this! If I get through this I'll go back through it all again a second time making a tutorial on how I did it with pics. It'll be good for me to cement the process too. I've gotten to the end of this page:
http://udn.epicgames.com/Three/SettingUpVehicles.html#Create A Physics Asset
It's a nice overview but not a detailed tutorial in the least, and now at the bottom it sort of just says 'then code it'....!!!! This is a great thread and thanks for all the work that's gone into it so far.
XxXdanceXxX
01-29-2010, 10:59 PM
crapageddon, yeah i should have explained more...it is by no means an exhaustive step by step tutorial.
Contents: The names are different SimpleCar/Humvee/VH_HMMWV because we did not want to go back and rename everything.
If the names are different, doesn't that mean you HAVE TO rename everything?
No, what I was trying to say here is that "The names are different" in the sense that these where the names we ended up with and did not want to go back and rename everything just to make it look good. Say you wanted to use different names than what we used in the tutorial then you would have to rename everything so your scripts,package,bones all work together.
Folder SimpleCar
Folder C.UDK.UDK.2009-12.UTGame.Content.Vehicles
File VH_Humvee.upk
Where do I put this?
C:\UDK\UDK-2009-12\UTGame\Content\Vehicles
Folder C.UDK.UDK-2009-12.Development.Src.MyMod.Classes
File UTVehicle_Humvee_Content.uc
File UTVehicleFactory_Humvee.uc
File UTVehicleHumvee.uc
File UTVehicleHumveeWheel.uc
Where do I put these?
Also, what is each of these files doing differently? Why not just ONE file?
C:\UDK\UDK-2009-12\Development\Src\MyMod\Classes
I am not a programmer but here is my educated guess on the scripts
UTVehicle_Humvee_Content.uc "This script connects your package"
UTVehicleFactory_Humvee.uc "This script allows you to add it ingame"
UTVehicleHumvee.uc "This script defines vehicle behaviour"
UTVehicleHumveeWheel.uc "This script defines wheel behaviour"
Folder Humvee Export Model
File VH_HMMWV.psa
File VH_HMMWV.PSK
File X_ModelInfo_VH_HMMWV.LOG
Just import these into a new package right?
You need to just import VH_HMMWV.PSK into a package, the VH_HMMWV.psa is loaded into a AnimSet, and X_ModelInfo_VH_HMMWV.LOG is the ActorX export log.
P.S. In order for Unreal to compile your scripts in MyMod folder you need to make sure that ModEditPackages=MyMod is not nulled out in DefaultEngine.ini
crapageddon
01-31-2010, 08:32 PM
Awesome, That helps a lot. I'm going through your tutorial now.
As I do - I'm not entirely clear on what exactly each part of the ANIMSET, ANIMTREE, and PHYSICS EDITOR are for. I'm putting some pics up here, just wondered if you could give me a quick rundown of what each general area is for. I'm getting the general idea that the animation sets are imported into the animSet Editor, but ALSO the animTree? Sorry just trying to get a clearer overview of how all this works. I've also been scouring the 'setting up vehicles' page on UDK and their explanations as well:
http://udn.epicgames.com/Three/SettingUpVehicles.html#Setting Up Vehicles
http://udn.epicgames.com/Three/AnimSetEditorUserGuide.html
http://udn.epicgames.com/Three/AnimTreeEditorUserGuide.html
http://udn.epicgames.com/Three/PhATUserGuide.html
If you could let me know just how each area works and what it's for that would help a lot. Some of it seems to be doing the same thing and so is a bit confusing. Here's my pictures of the windows for easier reference. (Red 1, Blue 2 etc).
http://i757.photobucket.com/albums/xx212/crapgarden/scorpion_AnimSetWindow_labeled.jpg
TABS FOR THOSE WINDOWS ABOVE
http://i757.photobucket.com/albums/xx212/crapgarden/scorpion_AnimSetProperties_labeled.jpg
http://i757.photobucket.com/albums/xx212/crapgarden/scorpion_Properties_Mesh_labeled.jpg
http://i757.photobucket.com/albums/xx212/crapgarden/scorpion_PhysicsAsset_labeled.jpg
http://i757.photobucket.com/albums/xx212/crapgarden/scorpionAnimTree_sections.jpg
Thanks!
MagnumAI
01-31-2010, 10:40 PM
@crapageddon
It would probably be easier to post specific questions on those areas, as that is a lot of information covered in several areas. The links you posted does provide a fair amount of information, to give you a general idea of what each section does.
geodav
02-01-2010, 01:54 PM
not being funny but if you have a look at my vehicle tutorials (videos) you'll have most of the info you need.
for a full vehicle check the UT3 hovercraft, with an updated quick run through on a wheeled vehicle in UDK
crapageddon
02-01-2010, 02:20 PM
I completely apologize for not being more specific. I hope these questions aren't too large in number. I've been scouring the documentation on the pages I listed previously and these are the questions that remain. I hope some of the answers aren't overly repetetive but I think this would shed a ton of light on the areas of mystery. Anyway here they are with Pics after each set:
ANIMSET EDITOR
QUESTION 1
This is just where I choose the SkeletalMesh to use, and other LOD's for the "extra Mesh 1, 2 ,3 etc" menus right? Or is it to actually import different skeletal meshes into a single asset?
QUESTION 2
a - This is simply the bone tree right?
b - These bones must be named in Maya/Max and cannot be changed in the editor correct?
QUESTION 3
This is just setting Parameters for the Bones of the skelMesh, or the bones AND the Mesh of the skel mesh?
http://i757.photobucket.com/albums/xx212/crapgarden/scorpion_AnimSetWindow_labeledQ.jpg
QUESTION 4
a - This seems to be where you select the .PSA file you've imported right?
b - This menu keeps snapping back to other animSets than the one I've imported onto my custom vehicle - any ideas why?
c - Do the brackets here mean the total number of animations imported in that set?
QUESTION 5
a - How are these sequences named separately from the AnimSet? Do you name these in Maya/Max before exporting as part of the ActorX process or in the editor?
b - Are the bracket numbers standing for the number of bones used? Number of frames in the animation? What are they indicators of?
QUESTION 6
What do I use this area for?
QUESTION 7
What do I use this area for?
QUESTION 8
a - this is for any animation that is a deformation to the mesh only correct?
b - are these files different than the standard .psa? If not - how does Unreal know the difference?
QUESTION 9
What are these sliders for?
QUESTION 10
What is this "MorphTarget" tab used for?
http://i757.photobucket.com/albums/xx212/crapgarden/scorpion_AnimSetProperties_labeledQ.jpg
http://i757.photobucket.com/albums/xx212/crapgarden/scorpion_Properties_Mesh_labeledQ.jpg
PHYSICS ASSET
QUESTION 11
I'm trying to make sure I understand how the physics asset and animation manager work together more clearly.
a - The physicsEditor works only with the rootBone of the skelMesh right?
b - This is primarily for static Meshes and Vehicles right?
QUESTION 12
What exactly are these parameters for? I know they're for the PhysicsAsset but what's an example of when and why I might change some of these? Some I get - but things like 'Sky Brightness' for a physicsNode?
QUESTION 13
a - What is this area for?
b - What are Box 0, and Box 1?
http://i757.photobucket.com/albums/xx212/crapgarden/scorpion_PhysicsAsset_labeledQ.jpg
ANIM TREE
QUESTION 14
What is this window for?
QUESTION 15
What is this window for?
QUESTION 16
What is this window for?
QUESTION 17
What is this window for?
QUESTION 18
What is this window for?
QUESTION 19
I'm assuming that these nodes are for implementing the damage blend shapes to the vehicle. I'll just use one node as an example - but could you just briefly explain what "SK_VH_Scorpion_Damaged_RtRearFender" is doing, and then what "MorphNodeW_RtRearFender" Node is doing to it before sending it to the animTree?
QUESTION 20
I get that this is the animation for the blades...I think.
a - Are the "blades_in", and "blades_out" nodes created when importing the .psa? The animTree? Both?
b - More directly - are they added to this menu by rightClicking and finding them in a menu there?
c - What is "AnimNodeBlendPerBone" doing to alternate between the blades and the booster animations?
d - Why does the above 'boosters' chain have an extra "AnimNodeBlendPerBone" node?
QUESTION 21
A similar question to the above - What is "SkelControlLookAt : F_L_Axle_Lookat" doing as it comes out from the AnimTree and then what does "SkelControlSingleBone : F_L_Limit" do after that?
QUESTION 22
What does "SkelControlSingleBone : Hatch" do as it comes from the AnimTree, and then what does "UTSkelControl_Damage : None" do after that?
QUESTION 23
What is "UTSkelControl_DamageHinge : DamageControl_Hood" for?
QUESTION 24
What's the function of "UTSkelControl_TurretConstrained : TurretRotate" and then what does "UTSkelControl_Damage : None" do in this case to it?
QUESTION 25
What is "SkelControlWheel : F_L_Tire_Cont" doing and then what is "UTSkelControl_Damage : None" doing with that data afterwards?
QUESTION 26
a - What is the difference between "Skel Mirror Axis", and "Skel Mirror Flip Axis"?
b - What is "Rot Origin"?
c - When would I use Skel Mirror Table?
d - What is the Scorpion doing with "Per Poly Collision Bone.." Parameter?
e - What is the Scorpion doing with "Add to Parent Per Pol..." Parameter?
f - What is the Scorpion doing with "Bounds Preview Asset" Parameter?
http://i757.photobucket.com/albums/xx212/crapgarden/scorpionAnimTree_sectionsQ.jpg
GENERAL QUESTIONS
a - When and where do I set up the keyboard/controller commands for the vehicle?
b - When I open the Scorpion Skeletal Mesh in the Generic Browser it looks identical to that of it's AnimSet. Am I opening the same AnimSet Editor two different ways (double clicking "SK_VH_Scorpion_001" vs "K_VH_Scorpion"?
c - I saved my animTree and animSets in the package of my map. I've closed and opened them before but this time they've all dissappeared except for my skelMesh. Any idea why they disappeared?
d - The Wheels turning is all animated dynamically via vehicle codes and classes, not in Maya correct? If so, what is the basic approach to deciding when to animate via code vs. animating using imported animation sets?
e - Heiarchy = SkelMesh > AnimSet > AnimTree? SkelMesh > AnimTree > AnimSet? Still trying to wrap my head around how they speak to each other?
f - Is the Anim Set editor the same window for "SkelMesh; AnimSet; MorphTarget?"
g - How does AnimTree know which skelMesh it belongs to? Can that be changed? Re-set? I right click and create a new AnimTree but I don't see where it knows that it belongs to which SkelMesh? Where are the AnimSet/SkelMesh, and AnimTree talking to each other? Everywhere else seems to have an input or dropdown where this relationship can change but I don't see one for this?
Thank's immensely for any time taken to answer these - I really appreciate it and apologize for their "UDK for dummies" nature.
@ GeoDav
You mean this tutorial right?
http://wiki.beyondunreal.com/UDK/Vehicle_Tutorial
reropme
02-01-2010, 02:39 PM
geodav means this tutorial http://sites.google.com/site/ut40kmod/UT40k_mod/udk-tutorials found on his site.
Hope that helps
XxXdanceXxX
02-01-2010, 03:53 PM
crapageddon, yeah i haven't gotten around to explaining the editor part much but what i did was just copy the scorpion setup. You can open the VH_Humvee.upk and see how mine differs from the scorpion maybe that would help. Other than that you might need to purchase some books becuase it is a lot of info to digest and cover.
crapageddon
02-01-2010, 06:22 PM
@reropme
thanks for the redirect!
@XxXdanceXxX
I know 26 questions is a lot (actually more counting the breakdowns) - sorry if it's daunting. I really appreciate the help so far. I'd love to figure out answers to them all and hopefully what I don't figure out in the tutorials from yourself and geodav I can get from some books, other members and just hours of noodling around breaking connections to see what happens. Any suggestions on good books? I know the UDK just got revamped so some of these books may or may not be out-dated. Also I feel like I have a good handle on level building, but it's the custom characters, vehicles, and unrealscripting that I would like to get a more solid foundation on. If any of these are better for that - or you know of a a better book I'd appreciate the suggestions.
MASTERING UNREAL TECH vol-1
http://www.amazon.com/Mastering-Unreal-Technology-Level-Design/dp/0672326922
MASTERING UNREAL TECH vol-2
http://www.amazon.com/gp/product/B00164X2YA/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&pf_rd_s=lpo-top-stripe-1&pf_rd_t=201&pf_rd_i=0672326922&pf_rd_m=ATVPDKIKX0DER&pf_rd_r=0KYFA8GCYNZSQEX8QXWV
MASTERING UNREAL TECH Vol-3
http://www.amazon.com/Mastering-Unreal-Technology-III-Introduction/dp/0672330822/ref=pd_sim_b_3
@anyone:
I apologize again for the large number of questions. If it helps cut down the number above, questions 1-3, and my general questions at the bottom are really the big roadBlocks right now if anyone does have time to give the briefest of answers to. Either way, when I've done both tutorials, I'll post the progress and any of my leftover questions if it helps any fellow noobers.
XxXdanceXxX
02-01-2010, 09:34 PM
1) Yes. Single asset not sure never tried but dont think so.
2) a. Skeleton Tree b.Correct, but never tried renaming them in editor.
3) Properties for the Mesh to connect the material,collision,bounds and Properties for AnimSet, AnimSequence, MorphTarget.
4) a No & Yes b Just a Browser to load the animation and test it thats why it doesnt save it. c I think it is the number of animation.
5) a Yes name them in 3d app and yes ActorX process. b I think it is the number of key frames but not positive.
6) Not sure never used it
7) Not sure never used it
8) Not sure never used it
9) Not sure never used it
10) Not sure never used it
11) I only use it to setup bounding box
12) Not sure never had to change anything
13) It is Skeleton Tree
14) Not sure never used it
15) Not sure never used it
16) Not sure never used it
17) The mesh
18) Not sure never used it
19) Not sure never used it
20) Not sure never used it
21 - 25) You select what kind of nodes or controls you want to use connect them and change their properties.
26) There is a mouseover comment on each of the properties.
GENERAL QUESTIONS
a Don't know
b You edit both by using the same AnimSet Editor but they are different
c You have to save, fully load, unload package
d Yes, not sure.
e Well everything is connecting to the SkeletalMesh one way or another. You right click SkeletalMesh to make the Physics Asset and AnimSet you connect the Material in SkeletalMesh/Mesh/Properties you connect the AnimTree by selecting it in preview and Add SkelControl Chain.
f Yes same editor
g Same as e
crapageddon
02-01-2010, 10:44 PM
Thanks so much for answering my questions! I know it's a pain and I really appreciate you taking the time. That sheds a ton of light on things and keeps me from thinking certain areas are more or less important than they are, and helps me realize how to see everything clearer. I guess my only final question is 'Why do you have to make an animSet if it's already created/accessible via the skelMesh? Seems redundant no?
I'm sure I'll figure it out. Thanks again for the help. I'm going through the tutorials and I'll post up the results as soon as I finish. THANK YOU!!!!!!!
XxXdanceXxX
02-02-2010, 08:07 AM
It is because it has to be able to be called by the scripts...
Here is an example: UTVehicle_Humvee_Content.uc
Begin Object Name=SVehicleMesh
SkeletalMesh=SkeletalMesh'VH_Humvee.VH_HMMWV'
AnimTreeTemplate=AnimTree'VH_Humvee.VH_HMMWV'
PhysicsAsset=PhysicsAsset'VH_Humvee.VH_HMMWV_Physi cs'
//MorphSets[0]=MorphTargetSet'VH_Scorpion.Mesh.VH_Scorpion_Morph Targets'
//AnimSets.Add(AnimSet'VH_Scorpion.Anims.K_VH_Scorpi on')
RBCollideWithChannels=(Default=TRUE,BlockingVolume =TRUE,GameplayPhysics=TRUE,EffectPhysics=TRUE,Vehi cle=TRUE,Untitled4=TRUE)
End Object
crapageddon
02-02-2010, 03:02 PM
Here's what gets me about the logic of that and maybe you can help negate my density - If the SkelMesh already takes us to the AnimEditor, that means it already has been created and we can add the .psa info to it via doubleClicking the skelMesh. Creating the actual animSet in generic seems like a redundant step. Like you're just making an alias for something you can already get to through the skelMesh. It seems (and this is where I'm hoping to see why I'm wrong), like the engine would be more efficient and less redundant if it just looked to the skelMesh for the same data it looks for in the animSet. No?
XxXdanceXxX
02-02-2010, 09:15 PM
Well it is awkward at first but that's normal when you are learning new software and the logistics of how everything works and once you have spent more time using it you will understand the logic behind everything.
crapageddon
02-03-2010, 03:01 AM
I appreciate your help. It's really helped give me a much better understanding of this entire process.
I've successfully imported your Humvee files and gotten that working. Now I'm trying to import my own crummy box car and trying to edit the code / extend the vehicle classes to get it to work so I can understand just what the code is doing.
One question - when I export animation from ActorX it seems to magically appear within the editor without ever importing the .psa file. Does the .psa file import automatically when you import its .psk/skelMesh?
Also should I not be saving my packages under the map file? Should I save it somewhere else? Everytime I right click to save the package it tells me I can't save via the browser, so I can only save when closing the map - a new option window to save it pops up. Is that odd?
...okay that's two questions - but I'm down from 27!
XxXdanceXxX
02-03-2010, 12:47 PM
If it is a new animation file with different name then it should not be showing but if it is a animation with the same name as one of your previous animations that's in another package then yeah it will appear.
Yeah to create new packages and save them you need to open a map otherwise you could lose all the assets you worked on in the default package. What i do is open map create new package import something and save it then start working on importing everything else.
crapageddon
02-03-2010, 02:29 PM
AnimSets/Actor X
Yeah it's a new animation file but it's magically appearing. I didn't import it. I feel like it grew a brain upon ActorX export and knew what to do before I did it. Bizarre. Maybe ActorX is telling it what to do? I'm assuming my exported files aren't haunted...but that would be pretty cool.
Package Saving
I think that's what I did. I have a test map I made called DM-Garage. Inside its Map Package, as a subdirectory I made "Vehicles" and in that is where I try to save my files but every time I right click it and choose save it tells me "Cannot save via the Browser - package not saved". It only lets me save when I close the map and says "This package has not been saved would you like to save it?" I of course click Yes, thanking my lucky stars it hasn't crashed, then wondering ....what happens if I crash while working one day? This seems incredibly unstable and not right. Do you know what I'm doing wrong? Maybe I shouldn't be saving it under the map directory?
crapageddon
02-03-2010, 06:12 PM
Any idea why the first line uses name "LRWheel" when everywhere else I can find in the code, skelMeshbones, and AnimTree uses "B_L_Tire"? Just wondering where LRWheel is being used or called to/from?
Begin Object Class=UTVehicleHumveeWheel Name=LRWheel
BoneName="B_L_Tire"
BoneOffset=(X=0.0,Y=-20.0,Z=0.0)
SkelControlName="B_L_Tire_Cont"
End Object
Wheels(1)=LRWheel
Also - in this code, how important are the "VH_" prefixes to the .psk, and .psa files? I don't have them on mine but should I have put them there? Not sure it it's something the engine requires or not?
Begin Object Name=SVehicleMesh
SkeletalMesh=SkeletalMesh'VH_Humvee.VH_HMMWV'
AnimTreeTemplate=AnimTree'VH_Humvee.VH_HMMWV'
PhysicsAsset=PhysicsAsset'VH_Humvee.VH_HMMWV_Physi cs'
//MorphSets[0]=MorphTargetSet'VH_Scorpion.Mesh.VH_Scorpion_Morph Targets'
//AnimSets.Add(AnimSet'VH_Scorpion.Anims.K_VH_Scorpi on')
RBCollideWithChannels=(Default=TRUE,BlockingVolume =TRUE,GameplayPhysics=TRUE,EffectPhysics=TRUE,Vehi cle=TRUE,Untitled4=TRUE)
End Object
crapageddon
02-03-2010, 07:24 PM
The above questions may have to do with what's wrong. After completing your Humvee tutorial I built in Maya, setup, and imported a version of my own car. I can get it to show up in the editor via the generic browser.
http://i757.photobucket.com/albums/xx212/crapgarden/car5skelMesh.jpg
Then I copied and tried to make my own versions of the 4 .uc vehicle class files like you did - copying and pasting the areas where you had replaced your file names VH_Humvee etc - with the names of my testCar5 files.
http://i757.photobucket.com/albums/xx212/crapgarden/reCompileWarnings.jpg
http://i757.photobucket.com/albums/xx212/crapgarden/reCompileWarnings.jpg
When I compiled - I was already getting warnings for the Humvee but it worked and I could get it into the editor. However, when I try to place the VH_testCar5 - it seems to place it but its invisible. Also I tried playing thinking maybe I would run into the collision geo of it but didn't. Any idea what's wrong?
http://i757.photobucket.com/albums/xx212/crapgarden/invisibleCarTag.jpg
I hope this is clear and please feel free to let me know if I'm overloading with questions or if there's a better way I can consolidate them for you. I know I keep saying it but I really do appreciate all the help.
123shua
02-04-2010, 01:22 AM
can someone please upload geodav tut to other site then fileplanet ?? thx !
geodav
02-04-2010, 02:20 PM
@123shua like where, i use fileplanet for a reason, main so that people go via my website click my pages (think of income) than use the links, btw i have no limit of upload on fileplanet, filefront limits me to 2gb total.
@crapageddon you really need to clear those errors otherwise you'll have problems, looks like it can't find your content package
crapageddon
02-04-2010, 06:13 PM
@geodav
Thanks - I'll look for a way to clear it up so the content package is found. Without going line by line, can you give me the jist of how I should go about fixing the warning errors? I'm pretty new to this.
@XxXdanceXxX
I had half the number of these warnings come up when I imported your Humvee file - but it still works in the editor. I can still import my testCar5 but its invisible.
Just throwing this out there - you guys rock something fierce. This UDK community is incredible.
XxXdanceXxX
02-04-2010, 06:45 PM
crapageddon, when you start renaming stuff here and there you have to be careful because you can mess things up. Like geodav said "looks like it can't find your content package" probably because your naming convention is off somewhere. MagnumAI is the coder that got the scripts to work and he could tell you more about those error messages.
crapageddon
02-04-2010, 07:04 PM
Thanks I'm asking him now.
geodav
02-05-2010, 02:50 PM
the main fault would be the folder setup i use
F:\UDK\UDK-2010-01\UTGame\Content\UT40k\Content\Vehicles
the other problem is typo's
crapageddon
02-05-2010, 06:02 PM
So the clues about the naming conventions and directories seem to be what cleared up the vast majority of my problems. I remade the car in Maya, new bones, new exports etc, and made sure to never use underscores, and no matter what only use the name 'testCar6'. The only warnings I still get are these:
C:\UDK\UDK-2010-01\Development\Src\MyMod\Classes\UTVehicletestCar6 .uc(155) : Warning, Property 'bSelfDestructArmed' declared with 'repnotify' but is not replicated
C:\UDK\UDK-2010-01\Development\Src\MyMod\Classes\UTVehicletestCar6 .uc(619) : Warning, 'X' : unreferenced local variable
C:\UDK\UDK-2010-01\Development\Src\MyMod\Classes\UTVehicletestCar6 .uc(619) : Warning, 'Y' : unreferenced local variable
C:\UDK\UDK-2010-01\Development\Src\MyMod\Classes\UTVehicletestCar6 .uc(619) : Warning, 'Z' : unreferenced local variable
C:\UDK\UDK-2010-01\Development\Src\MyMod\Classes\UTVehicletestCar6 .uc(620) : Warning, 'PlaceDist' : unreferenced local variable
C:\UDK\UDK-2010-01\Development\Src\MyMod\Classes\UTVehicletestCar6 .uc(203) : Warning, 'BoostRemaining' : unreferenced local variable
C:\UDK\UDK-2010-01\Development\Src\MyMod\Classes\UTVehicletestCar6 .uc(195) : Warning, 'BoostRemaining' : unreferenced local variable
C:\UDK\UDK-2010-01\Development\Src\MyMod\Classes\UTVehicletestCar6 .uc(940) : Warning, Unknown property in defaults: BoosterForceMagnitude=450.0
C:\UDK\UDK-2010-01\Development\Src\MyMod\Classes\UTVehicletestCar6 .uc(962) : Warning, Unknown property in defaults: BladeBreakPoint=0.8
C:\UDK\UDK-2010-01\Development\Src\MyMod\Classes\UTVehicletestCar6 Content.uc(33) : Warning, ObjectProperty Engine.SkeletalMeshComponent:PhysicsAsset: unresolved reference to 'PhysicsAsset'VH_testCar6.testCar6skelMesh_Physics ''
C:\UDK\UDK-2010-01\Development\Src\MyMod\Classes\UTVehicletestCar6 Content.uc(33) : Warning, Invalid property value in defaults: PhysicsAsset=PhysicsAsset'VH_testCar6.testCar6skel Mesh_Physics'
The car is importable now via the UT_VehicleFactory under navigation points. The only problem now is that when I play:
- it rotates
- I walk right through it (can't get inside the vehicle).
Any clues? Here are the pictures:
Vehicle "testCar6" now shows up as a vehicle Navigation Point from Vehicle Factory.SUCCESS???
http://i757.photobucket.com/albums/xx212/crapgarden/importingNow.jpg
When I start the game though - it rotates and I can walk through it.Hmmm...almost success.
http://i757.photobucket.com/albums/xx212/crapgarden/whyrotating.jpg
http://i757.photobucket.com/albums/xx212/crapgarden/noCollision.jpg
This is what I'm looking for:
http://i757.photobucket.com/albums/xx212/crapgarden/enterVehicleWorking.jpg
crapageddon
02-05-2010, 06:33 PM
Okay so I figured out the above problem was my physics asset and that it couldn't find it in my package. Now the vehicle works, but when I start the game, it turns sideways, and when I get inside, it's drives sideways. While this is pretty funny, I do want to know how to fix it. I'm guessing it has something to do with my joints. I thought I set it all properly in Maya with Z up, then freezing the joint orients. Is that where the problem lies? In Maya?
Here's some pics:
Start game and it turns sideways plus 45 degrees
http://i757.photobucket.com/albums/xx212/crapgarden/sidewaysCar6__0002_Layer2.jpg
I can get inside and drive it now! But it's sideways!
http://i757.photobucket.com/albums/xx212/crapgarden/sidewaysCar6__0001_Layer3.jpg
I've always wanted this when parallel parking
http://i757.photobucket.com/albums/xx212/crapgarden/sidewaysCar6__0003_Layer1.jpg
The 'front' wheels, or what are supposed to be the front wheels are still turning when I steer.
http://i757.photobucket.com/albums/xx212/crapgarden/sidewaysCar6__0000_Layer4.jpg
Here's some shots of the bones in the AnimSetEditor just in case it helps clarify.
http://i757.photobucket.com/albums/xx212/crapgarden/joints_sideways.jpg
crapageddon
02-05-2010, 09:05 PM
Ha - okay hopefully those pics above are useful if someone else hits the same snags. It turns out I had to re-orient everything in Maya. That seems to have fixed it. Now the car totally works. IT WORKS!!!!!
The only thing is - I can't exit the car.When I try to exit the vehicle - then UDK crashes. That's my final problem with the car.
These might be some helpful clues - when I import my car, the back end looks too low, and the front vibrates or 'humps' the ground both before and after I enter the car.
http://i757.photobucket.com/albums/xx212/crapgarden/humpinAround.jpg
http://i757.photobucket.com/albums/xx212/crapgarden/offTheGround.jpg
I noticed I can't actually exit the Humvee either. Thanks so much for the help! Once I fix this crashing bug, I'll go back in and hopefully be able to create a 'generic vehicle' class that doesn't act like a scorpion to share with anyone who wants it.
Th3ProphetMan
02-06-2010, 09:54 AM
Hi, i've been following tutorials and looking at crapageddon's posts and i have had about the same problems as him :), thankfully this thread has helped a lot. Now i have the car in the editor and when i compile the classes it only gives some strange errors but it finds everything in my pakage.
however my car still rotates 90 degrees. if i try to enter the car it flies like the player is trying to put it straight. If i double press E i get in the vehicle but and shortly after UDk crashes.
Still looking into it but i have always oriented it the same way (Z for vertical, Y for lateral and X for back and forth)
EDIT:
Now it doesn't crash, not sure but crashes seemed related to suspension bones. I fixed these and also fixed the wheels which didn't turn or rotate, now they work (this was caused because SkelControlWheel names were not properly changed in the script file)
But the car still rotates 90 degrees so it stand up so to speak over its rear wheels. :(
crapageddon
02-06-2010, 02:19 PM
@Th3ProphetMan
I fixed my rotation issues in Maya by reorienting my joints, and freezing them back to zero. What was the issue you had with the SkelControlWheel scripts? Can you paste a before and after up here? I'm wondering if that has to do with my own crashes. I'm fine until I exit the car, then it crashes when I try.
Th3ProphetMan
02-06-2010, 02:36 PM
@Th3ProphetMan
I fixed my rotation issues in Maya by reorienting my joints, and freezing them back to zero. What was the issue you had with the SkelControlWheel scripts? Can you paste a before and after up here? I'm wondering if that has to do with my own crashes. I'm fine until I exit the car, then it crashes when I try.
Hi, unfortunately i dont have info on how it was before but ill explain:
Begin Object Class=UTVehicleSophiaWheel Name=RRWheel
BoneName="B_R_Tire"
BoneOffset=(X=0.0,Y=20.0,Z=0.0)
SkelControlName="B_R_Control"
End Object
Wheels(0)=RRWheel
Begin Object Class=UTVehicleSophiaWheel Name=LRWheel
BoneName="B_L_Tire"
BoneOffset=(X=0.0,Y=-20.0,Z=0.0)
SkelControlName="B_L_Control"
End Object
Wheels(1)=LRWheel
Begin Object Class=UTVehicleSophiaWheel Name=RFWheel
BoneName="F_R_Tire"
BoneOffset=(X=0.0,Y=20.0,Z=0.0)
SteerFactor=1.0
LongSlipFactor=2.0
LatSlipFactor=3.0
HandbrakeLongSlipFactor=0.8
HandbrakeLatSlipFactor=0.8
SkelControlName="F_R_Control"
End Object
Wheels(2)=RFWheel
Begin Object Class=UTVehicleSophiaWheel Name=LFWheel
BoneName="F_L_Tire"
BoneOffset=(X=0.0,Y=-20.0,Z=0.0)
SteerFactor=1.0
LongSlipFactor=2.0
LatSlipFactor=3.0
HandbrakeLongSlipFactor=0.8
HandbrakeLatSlipFactor=0.8
SkelControlName="F_L_Control"
End Object
Wheels(3)=LFWheel
This is the part of the script i mean, near the end of UTVehicleHumvee.uc (or the name of the car you used)
Make sure the SkelControlName values here correspond to the SkelControlWheel node attached to you Tires in the AnimTree. (See pic for more info).
http://i49.tinypic.com/29405rd.jpg
If this doesn't fix the problem the second thing i would check are the SkelControlLookAt node in the animtree, compare them side by side to the ones from the scorpion and see if something is wrong. just make a backup copy of your AnimTree in case you change anything and things get worse :P
Regarding the orientation of joints i dont really understand hehe, i use 3ds max and as i mentioned i have all oriented the same way, and facing the X axis, like the Humvee example :S
if you can explain in any way with a screenshot i'd be grateful :P
XxXdanceXxX
02-06-2010, 04:06 PM
Th3ProphetMan, what are you using the Axle Limit Control for?
geodav
02-06-2010, 04:23 PM
@Th3ProphetMan if your using max the watch my UT3 vehicle tutorials they explain how to do it in max
for each of your bones/object you need to make sure that the pivots are aligned correctly
crapageddon
02-06-2010, 05:58 PM
...I'm in a small club using maya > Unreal workflow aren't I?
crapageddon
02-06-2010, 06:34 PM
1 - skelControl Wheel names
My skelControl Names seem to line up with what's in the animTree. I'm guessing though - that this could have something to do with the fact that I didn't bother making an axle. I think that's what's causing the 'humping effect' of my vehicle.
One question though - what are the LFWheel names used for?
Begin Object Class=UTVehicletestCar6Wheel Name=LFWheel
BoneName="F_L_Tire"
BoneOffset=(X=0.0,Y=-20.0,Z=0.0)
SteerFactor=1.0
LongSlipFactor=2.0
LatSlipFactor=3.0
HandbrakeLongSlipFactor=0.8
HandbrakeLatSlipFactor=0.8
SkelControlName="F_L_Tire_Cont"
End Object
Wheels(3)=LFWheel
*Also, any clue on how to find the wheel radius?
Begin Object Class=SVehicleWheel Name=RRWheel
BoneName="R_R_Tire"
SkelControlName="R_R_Tire_Cont"
WheelRadius=25
End Object
Wheels(0)=RRWheel
}
2 - Exit Vehicle - Crashes Editor
Still not sure about the exiting thought. I don't see how that would effect me exiting the vehicle - AND I also can't exit the humvee tutorial car. It doesn't crash the editor, though. Any thoughts on that would be awesome.
3 - Orient Joint Pics
@Th3ProphetMan - I'm not an expert on this but basically when I went in an 'reOriented/zeroed out' the joints that seemed to fix the sideways-ness of my vehicle.
At first glance, it seemed like everything was ok. I set the Maya Z to up so it replicates the environment properly, then had my vehicle point in the +X direction, with wheels rolling on the Y as they describe.
http://i757.photobucket.com/albums/xx212/crapgarden/orientCarJointsMaya__0003_Layer2.jpg
When I checked the joint attributes though - I found that my Z was set to rotate -90. This sounded like something turned sideways to me...
http://i757.photobucket.com/albums/xx212/crapgarden/orientCarJointsMaya__0002_Layer3.jpg
Long story short - I went through and re-oriented my joints to go to Zero. This meant deleting my bones and re-doing them (couldn't unbind the previous bindPose for some reason) then I made sure to re-orient the joints so that they matched. Without re-doing the skeleton - sometimes chaning the joint would rotate the mesh and vice versa.
http://i757.photobucket.com/albums/xx212/crapgarden/orientCarJointsMaya__0001_Layer4.jpg
So, once that was all fixed, everything lined up fine and my care now imports and drives smoothly. Only problem is that it still crashes when I exit the editor.
http://i757.photobucket.com/albums/xx212/crapgarden/orientCarJointsMaya__0003_Layer2.jpg
Hope that helps you out. I'm no expert on joint orientation but this seemed to be what fixed the sideways issue.
Spoondog
02-06-2010, 10:26 PM
I am confused a bit.
I have successfully made a copy of the scorpion vehicle and have it placed in-game via factory (at the moment I'm not concerned with how it looks so it's just a straight copy). But I can't seem to find the right property to adjust it's overall speed/acceleration. I've tried the things mentioned in this thread, to no avail, in the default properties:
MaxSpeed=6000
AirSpeed=3500
GroundSpeed=4000
...and it seems to work because if I use "editactor" or "rc" in PIE to view the vehicle's new properties those show up, but the speed of the car is the same.
I'm wondering if it just never reaches these speeds because of gear ratios or something? Like "Engine RPMCurve" and "Torque VSpeed Curve"... but I have no idea how to interpret the values of those properties.
I've attached my files in case anyone cares to help (though like I say, it's just a copy of the four relevant scorpion files with class names and references changed). Basically all I'm after is a fast scorpion...
Th3ProphetMan
02-07-2010, 12:18 PM
Thanks to all for the input, i removed the control limits from animtree cleaned name prefixes using something more like in geodav's tuts and everything is cleaner now, thanks!
I also deleted the old bones that i had imported from the humvee files, and made my own bones with pyramid primitives, now it finally stopped rotating! :)
Everything seems to work now but it only works if i play the map from the editor viewport. If i try to open a map with my vehicle in it from the game itself it crashes while loading the map. Any ideas for this? i'm pretty sure i have double checked everything thinkable in the packages so my guess is the problem might be in the script files which still have a lot of scorpion blades and boost rubish, some of which i have removed possibly causing more harm than good :P
On a side note, crapageddon, if your vehicle still seems to be heavier on the rear side, try setting WheelSuspensionBias (in UTVehicle_Humvee.uc) to something between -0.5 and 0, that helped in my case.
geodav
02-07-2010, 01:56 PM
@Th3ProphetMan check your launch.log when you start from game
@Spoondog, compare your code against the UTVehicle class you may find a max speed or something like that, also
I'm wondering if it just never reaches these speeds because of gear ratios or something? Like "Engine RPMCurve" and "Torque VSpeed Curve"... but I have no idea how to interpret the values of those properties.
try comparing these values against those from the UT3 vehicles
Spoondog
02-07-2010, 10:28 PM
Had a quick tinker... "Engine RPMCurve" and "Torque VSpeed Curve" are definitely the ones I want to look at. I put the point values into the Cascade Curve Editor so that I could visualize the curve better and now it makes a bit more sense. It's still going to be a pain to edit without a full understanding, but I was at least able to change what appeared to be its gears and torque, to something a bit faster.
geodav
02-08-2010, 01:57 PM
@Spoondog, please let us know how you get on and what value work together.
no doubt the values work to replace engine revs, gearbox and final drive ratios, it's been a very long time since i learned any of that !!!!
UnWheelModeller
02-08-2010, 02:35 PM
Here is my setting for UnWheel 2 vehicles. These will be way too fast for anything but a race track with room to turn and slow down;
TorqueVSpeedCurve=(Points=((InVal=-590.0,OutVal=0.0),(InVal=-100.0,OutVal=28.0),(InVal=0.0,OutVal=55.0),(InVal= 450.0,OutVal=60.0),(InVal=6050.0,OutVal=10.0),(InV al=9150.0,OutVal=0.0)))
EngineRPMCurve=(Points=((InVal=-500.0,OutVal=2500.0),(InVal=0.0,OutVal=300.0),(InV al=1149.0,OutVal=5500.0),(InVal=1150.0,OutVal=2500 .0),(InVal=2149.0,OutVal=5500.0),(InVal=2150.0,Out Val=2500.0),(InVal=2850.0,OutVal=5500.0),(InVal=28 51.0,OutVal=2500.0),(InVal=3850.0,OutVal=5500.0),( InVal=3851.0,OutVal=2500.0),(InVal=4100.0,OutVal=5 500.0)))
The EngineRPMCurve determines shift points for the engine, and as far as I could tell didn't affect speed.
These settings will not increase top speed unless you change the setting geodav mentioned;
// Absolute max physics speed
MaxSpeed=8500
Again, this is my setting with LONG tracks. Type showdebug in the console and your speed will display with alot of other settings.
I have also changed these setting;
GroundSpeed=7000
AirSpeed=7000
crapageddon
02-08-2010, 02:37 PM
Anyone have any thoughts on why my vehicle crashes when I try to exit it? I worked off the Humvee files. Everything else seems fine.
@SpoonDog
Were "Engine RPMCurve" and "Torque VSpeed Curve" the settings you found in the UTVehicle Class?
Th3ProphetMan
02-08-2010, 02:44 PM
@Geodav, the launch.log file is empty when udk crashes, like it doesnt get to write it :(
@crapageddon, my bet would be that something is not named properly somewhere, for example your wheel bone names have to be right in the bones when you exprto the mesh, in the animtree and in the script. If not, take whatever part of the vehicle is older and redo it from scratch (scripts, animtree, physics asset, etc) and maybe you get it to work.
i'm now going to redo scripts on mine and see if that fixes my crash when i load levels from the game and not the editor.
Spoondog
02-08-2010, 05:15 PM
Here is my setting for UnWheel 2 vehicles.
Thanks!
Were "Engine RPMCurve" and "Torque VSpeed Curve" the settings you found in the UTVehicle Class?
They were in the default properties of UTVehicle_Scorpion.
UnWheelModeller
02-09-2010, 08:09 AM
Spoondog requested the rest of my vehicle code, so I am just posting it here.
Ist subclass of UW2Vehicle:
This class removes Scorpion code I didn't want or need;
EDIT: I had the order wrong this morning, I have just corrected it.
/**
* Copyright 1998-2009 Epic Games, Inc. All Rights Reserved.
*/
class UW2Vehicle_Base extends UTVehicle
abstract;
/** rocket booster properties */
var float BoosterForceMagnitude;
var repnotify bool bBoostersActivated;
/** If true, steering is very limited (enabled while boosting) */
var bool bSteeringLimited;
var Controller SelfDestructInstigator;
/** Radius to auto-check for targets when in self-destruct mode */
var float BoosterCheckRadius;
/** How long you can boost */
var float MaxBoostDuration;
/** used to track boost duration */
var float BoostStartTime;
/** How long it takes to recharge between boosts */
var float BoostChargeDuration;
/** used to track boost recharging duration */
var float BoostChargeTime;
var AudioComponent BoosterSound;
/** Coordinates for the boost tooltip textures */
var UIRoot.TextureCoordinates BoostToolTipIconCoords;
/** Coordinates for the eject tooltip textures */
var UIRoot.TextureCoordinates EjectToolTipIconCoords;
var class<UTDamageType> SelfDestructDamageType;
var float BoostPowerSpeed;
var float BoostReleaseTime;
var float BoostReleaseDelay;
var SoundCue SelfDestructSoundCue;
var SoundCue SelfDestructReadyCue;
var SoundCue SelfDestructWarningSound;
var SoundCue SelfDestructEnabledSound;
var SoundCue SelfDestructEnabledLoop;
var CameraAnim RedBoostCamAnim;
var CameraAnim BlueBoostCamAnim;
/** Sound played whenever Suspension moves suddenly */
var SoundCue SuspensionShiftSound;
var AudioComponent SelfDestructEnabledComponent;
var AudioComponent SelfDestructWarningComponent;
var AudioComponent SelfDestructReadyComponent;
var SoundCue EjectSoundCue;
/** set when boosters activated by Kismet script, so keep them active regardless of input */
var bool bScriptedBoosters;
/** replicated flag indicating when self destruct is activated */
var repnotify bool bSelfDestructArmed;
/** double tap forward to start rocket boosters */
var bool bTryToBoost;
var bool bWasThrottle;
var float ThrottleStartTime;
/** dynamic light */
var PointLightComponent LeftBoosterLight, RightBoosterLight;
/** Rocket speed is the (clamped) max speed while boosting */
var float RocketSpeed;
/** Square of minimum speed needed to engage self destruct */
var float SelfDestructSpeedSquared;
/** How long the springs should be when the wheels need to be locked to the ground */
var() float LockSuspensionTravel;
/** How stiff the suspension should be when the wheels need to be locked to the ground */
var() float LockSuspensionStiffness;
/** swap BigExplosionTemplate for this when self-destructing */
var ParticleSystem SelfDestructExplosionTemplate;
var bool bAISelfDestruct;
replication
{
if (bNetDirty)
bBoostersActivated,bSelfDestructArmed;
}
/**
* Returns true if self destruct conditions (boosting, going fast enough) are met
*/
function bool ReadyToSelfDestruct()
{
return (bBoostersActivated && (VSizeSq(Velocity) > SelfDestructSpeedSquared));
}
function Tick( FLOAT DeltaSeconds )
{
local TeamInfo InstigatorTeam;
local float BoostRemaining;
local vector BoostDir;
// ready sound above everything else so that it can be stopped if dead
if ( SelfDestructReadyComponent != None )
{
// stop self destruct ready sound if no longer ready
if( !bDriving || (SelfDestructInstigator != None) || !IsLocallyControlled() || !ReadyToSelfDestruct() )
{
SelfDestructReadyComponent.Stop();
SelfDestructReadyComponent = None;
}
}
else if( bDriving && !bDeadVehicle && IsLocallyControlled() && ReadyToSelfDestruct() )
{
// play sound when ready to self destruct
SelfDestructReadyComponent = CreateAudioComponent(SelfDestructReadyCue,TRUE,TRU E,FALSE);
}
if ( bDeadVehicle )
return;
if ( SelfDestructInstigator != None )
{
if ( (WorldInfo.TimeSeconds - BoostStartTime > MaxBoostDuration) )
{
// blow up
SelfDestruct(None);
return;
}
InstigatorTeam = (SelfDestructInstigator.PlayerReplicationInfo != None) ? SelfDestructInstigator.PlayerReplicationInfo.Team : None;
if ( CheckAutoDestruct(InstigatorTeam, BoosterCheckRadius) )
{
return;
}
}
else
{
if ( bTryToBoost )
{
// turbo mode
if ( !bBoostersActivated )
{
if ( WorldInfo.TimeSeconds - BoostChargeTime > BoostChargeDuration ) // Starting boost
{
ActivateRocketBoosters();
bBoostersActivated = TRUE;
BoostStartTime = WorldInfo.TimeSeconds;
}
}
}
bTryToBoost = false;
if ( (Role == ROLE_Authority) || IsLocallyControlled() )
{
if ( bBoostersActivated )
{
if ( WorldInfo.TimeSeconds - BoostStartTime > MaxBoostDuration ) // Ran out of Boost
{
DeactivateRocketBoosters();
bBoostersActivated = FALSE;
BoostChargeTime = WorldInfo.TimeSeconds;
}
else if ( (Throttle <= 0) && (WorldInfo.TimeSeconds - BoostReleaseTime > BoostReleaseDelay) ) // Stopped in middle of boost
{
DeactivateRocketBoosters();
bBoostersActivated = FALSE;
BoostRemaining = MaxBoostDuration - WorldInfo.TimeSeconds + BoostStartTime;
BoostChargeTime = WorldInfo.TimeSeconds - FMin(BoostChargeDuration - 2.0, BoostRemaining * BoostChargeDuration/MaxBoostDuration);
}
else
{
BoostReleaseTime = WorldInfo.TimeSeconds;
}
}
else if ( bSteeringLimited && (VSizeSq(Velocity) < Square(AirSpeed)) )
{
}
}
}
if ( bBoostersActivated )
{
BoostDir = vector(Rotation);
if ( VSizeSq(Velocity) < BoostPowerSpeed*BoostPowerSpeed )
{
if ( BoostDir.Z > 0.7 )
AddForce( (1.0 - BoostDir.Z) * BoosterForceMagnitude * BoostDir );
else
AddForce( BoosterForceMagnitude * BoostDir );
}
else
AddForce( 0.25 * BoosterForceMagnitude * BoostDir );
}
}
function bool EagleEyeTarget()
{
return ReadyToSelfDestruct();
}
simulated function PostBeginPlay()
{
Super.PostBeginPlay();
if(SimObj.bAutoDrive)
{
SetDriving(true);
}
}
/**
* RanInto() called for encroaching actors which successfully moved the other actor out of the way
*
* @param Other The pawn that was hit
*/
event RanInto(Actor Other)
{
local float BoostRemaining;
if ( bBoostersActivated && !bAISelfDestruct && (Other == Controller.Enemy) && (UTBot(Controller) != None) )
{
DeactivateRocketBoosters();
bBoostersActivated = FALSE;
BoostRemaining = MaxBoostDuration - WorldInfo.TimeSeconds + BoostStartTime;
BoostChargeTime = WorldInfo.TimeSeconds - FMin(BoostChargeDuration - 2.f, BoostRemaining * BoostChargeDuration/MaxBoostDuration);
}
super.RanInto(Other);
}
function PancakeOther(Pawn Other)
{
local float BoostRemaining;
if ( bBoostersActivated && !bAISelfDestruct && (Other == Controller.Enemy) && (UTBot(Controller) != None) )
{
DeactivateRocketBoosters();
bBoostersActivated = FALSE;
BoostRemaining = MaxBoostDuration - WorldInfo.TimeSeconds + BoostStartTime;
BoostChargeTime = WorldInfo.TimeSeconds - FMin(BoostChargeDuration - 2.f, BoostRemaining * BoostChargeDuration/MaxBoostDuration);
}
super.PancakeOther(Other);
}
/**
* Are we allowing this Pawn to be based on us?
*/
simulated function bool CanBeBaseForPawn(Pawn APawn)
{
return bCanBeBaseForPawns && !bDriving;
}
/** DriverEnter()
Make Pawn P the new driver of this vehicle
*/
function bool DriverEnter(Pawn P)
{
local Pawn BasedPawn;
if ( super.DriverEnter(P) )
{
ForEach BasedActors(class'Pawn', BasedPawn)
{
if(BasedPawn != Driver)
{
BasedPawn.JumpOffPawn();
}
}
return true;
}
return false;
}
simulated function SetInputs(float InForward, float InStrafe, float InUp)
{
Super.SetInputs(InForward, InStrafe, InUp);
if (!bBoostersActivated && WorldInfo.TimeSeconds - BoostChargeTime > BoostChargeDuration)
{
if (bScriptedBoosters)
{
bTryToBoost = true;
}
else if (IsLocallyControlled())
{
if (Throttle > 0.0)
{
if (Rise > 0.0)
{
ServerBoost();
bTryToBoost = true;
}
else if (!bWasThrottle)
{
if (WorldInfo.TimeSeconds - ThrottleStartTime < class'PlayerInput'.default.DoubleClickTime)
{
ServerBoost();
bTryToBoost = true;
}
ThrottleStartTime = WorldInfo.TimeSeconds;
}
bWasThrottle = true;
}
else if (Throttle <= 0)
{
bWasThrottle = false;
}
}
}
}
simulated function StopVehicleSounds()
{
super.StopVehicleSounds();
BoosterSound.Stop();
}
simulated event SuspensionHeavyShift(float Delta)
{
if(Delta>0)
{
PlaySound(SuspensionShiftSound);
}
}
/** ActivateRocketBoosters()
called when player activates rocket boosters
*/
simulated event ActivateRocketBoosters()
{
local CameraAnim UseCamAnim;
AirSpeed = Default.RocketSpeed;
if ( WorldInfo.NetMode == NM_DedicatedServer )
return;
// Play any animations/etc here
if ( UTPlayerController(Controller) != none )
{
///UTPlayerController(Controller).StartZoom(BoosterFO VAngle,60);
UseCamAnim = (Team==1) ? BlueBoostCamAnim : RedBoostCamAnim;
UTPlayerController(Controller).PlayCameraAnim(UseC amAnim, 1.0, 1.0, 0.1, 0.2, FALSE, FALSE);
}
BoosterSound.Play();
if (VehicleEffects[0].EffectRef != none)
{
VehicleEffects[0].EffectRef.bJustAttached = TRUE;
}
if (VehicleEffects[1].EffectRef != none)
{
VehicleEffects[1].EffectRef.bJustAttached = TRUE;
}
VehicleEvent( 'BoostStart' );
if ( PlayerController(Controller) != None )
{
Mesh.AttachComponentToSocket(LeftBoosterLight, VehicleEffects[0].EffectSocket);
Mesh.AttachComponentToSocket(RightBoosterLight, VehicleEffects[1].EffectSocket);
LeftBoosterLight.SetEnabled(TRUE);
RightBoosterLight.SetEnabled(TRUE);
}
}
/** DeactivateHandbrake()
called (usually by a timer) to deactivate the handbrake
*/
simulated function DeactivateHandbrake()
{
bOutputHandbrake = FALSE;
bHoldingDownHandbrake = FALSE;
}
/** DeactivateRocketBoosters()
called when player deactivates rocket boosters or they run out
*/
simulated event DeactivateRocketBoosters()
{
local UTPlayerController PC;
// Set handbrake to decrease the possibility of a rollover
AirSpeed = Default.AirSpeed;
if ( WorldInfo.NetMode == NM_DedicatedServer )
return;
PC = UTPlayerController(Controller);
if ( PC != none )
// play animation
///BoosterBlend.AnimStopFire();
// deactivate booster sound and effects
BoosterSound.Stop();
VehicleEvent( 'BoostStop' );
LeftBoosterLight.SetEnabled(FALSE);
RightBoosterLight.SetEnabled(FALSE);
Mesh.DetachComponent(LeftBoosterLight);
Mesh.DetachComponent(RightBoosterLight);
}
function OnActivateRocketBoosters(UTSeqAct_ActivateRocketBo osters BoosterAction)
{
bScriptedBoosters = true;
}
reliable server function ServerBoost()
{
bTryToBoost = true;
}
/** Self destruct immediately if activated and hit by EMP */
simulated function bool DisableVehicle()
{
local bool bResult;
bResult = super.DisableVehicle();
if ( SelfDestructInstigator != None )
{
SelfDestruct(None);
return true;
}
return bResult;
}
simulated function BlowupVehicle()
{
if (bBoostersActivated)
{
bBoostersActivated=FALSE;
DeactivateRocketBoosters();
}
Super.BlowupVehicle();
}
event SelfDestruct(Actor ImpactedActor)
{
Health = -100000;
if(SelfDestructWarningComponent != none)
{
SelfDestructWarningComponent.Stop();
}
if(SelfDestructEnabledComponent != none)
{
SelfDestructEnabledComponent.Stop();
}
KillerController = SelfDestructInstigator;
BlowUpVehicle();
if ( ImpactedActor != None )
{
ImpactedActor.TakeDamage(600, SelfDestructInstigator, GetTargetLocation(), 200000 * Normal(Velocity), SelfDestructDamageType,, self);
}
HurtRadius(600,600, SelfDestructDamageType, 200000, GetTargetLocation(), ImpactedActor, SelfDestructInstigator);
PlaySound(SelfDestructSoundCue);
BoostStartTime = WorldInfo.TimeSeconds;
}
// The pawn Driver has tried to take control of this vehicle
function bool TryToDrive(Pawn P)
{
return (SelfDestructInstigator == None) && Super.TryToDrive(P);
}
simulated event ReplicatedEvent(name VarName)
{
if (VarName == 'bBoostersActivated')
{
if ( bBoostersActivated )
{
ActivateRocketBoosters();
}
else
{
DeActivateRocketBoosters();
}
}
else if (VarName == 'bSelfDestructArmed')
{
PlaySelfDestruct();
}
else
{
Super.ReplicatedEvent(VarName);
}
}
simulated function PlaySelfDestruct()
{
DeadVehicleLifeSpan = BurnOutTime + 0.01;
UTVehicleSimCar(SimObj).bDriverlessBraking = false;
// play sound
PlaySound(SelfDestructEnabledSound);
if(SelfDestructWarningComponent == none)
{
SelfDestructWarningComponent = CreateAudioComponent(SelfDestructWarningSound, FALSE, TRUE);
if ( SelfDestructWarningComponent != None )
{
SelfDestructWarningComponent.Location = Location;
SelfDestructWarningComponent.bUseOwnerLocation = true;
AttachComponent(SelfDestructWarningComponent);
}
}
if ( SelfDestructWarningComponent != None )
{
SelfDestructWarningComponent.Play();
}
if(SelfDestructEnabledComponent == None)
{
SelfDestructEnabledComponent = CreateAudioComponent(SelfDestructEnabledLoop, FALSE, TRUE);
if ( SelfDestructEnabledComponent != None )
{
SelfDestructEnabledComponent.Location = Location;
SelfDestructEnabledComponent.bUseOwnerLocation = true;
AttachComponent(SelfDestructEnabledComponent);
}
}
if ( SelfDestructEnabledComponent != None )
{
SelfDestructEnabledComponent.FadeIn(1.0f,1.0f);
}
// blow off the hatch
BigExplosionTemplates.length = 1;
BigExplosionTemplates[0].Template = SelfDestructExplosionTemplate;
BigExplosionTemplates[0].MinDistance = 0.0;
}
simulated function DisplayHud(UTHud Hud, Canvas Canvas, vector2D HudPOS, optional int SeatIndex)
{
local PlayerController PC;
super.DisplayHud(HUD, Canvas, HudPOS, SeatIndex);
PC = PlayerController(Seats[0].SeatPawn.Controller);
if (PC != none)
{
if (Throttle > 0.0 && !bBoostersActivated && (WorldInfo.TimeSeconds - BoostChargeTime > BoostChargeDuration))
{
Hud.DrawToolTip(Canvas, PC, "GBA_Jump", Canvas.ClipX * 0.5, Canvas.ClipY * 0.95, BoostToolTipIconCoords.U, BoostToolTipIconCoords.V, BoostToolTipIconCoords.UL, BoostToolTipIconCoords.VL, Canvas.ClipY/720);
}
else if (ReadyToSelfDestruct())
{
Hud.DrawToolTip(Canvas, PC, "GBA_Use", Canvas.ClipX * 0.5, Canvas.ClipY * 0.95, EjectToolTipIconCoords.U, EjectToolTipIconCoords.V, EjectToolTipIconCoords.UL, EjectToolTipIconCoords.VL, Canvas.ClipY/720);
}
}
}
function DriverLeft()
{
if ( ReadyToSelfDestruct() )
{
SelfDestructInstigator = (Driver != none) ? Driver.Controller : None;
bShouldEject = true;
if ( PlayerController(SelfDestructInstigator) != None )
{
PlayerController(SelfDestructInstigator).ClientPla ySound(EjectSoundCue);
}
BoostStartTime = WorldInfo.TimeSeconds - MaxBoostDuration + 1.0;
bSelfDestructArmed = true;
PlaySelfDestruct();
}
Super.DriverLeft();
}
/**
* Extra damage if hit while boosting
*/
simulated event TakeDamage(int Damage, Controller EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser)
{
local PlayerController PC;
if (Role == ROLE_Authority)
{
if ( SelfDestructInstigator != None )
{
PC = PlayerController(SelfDestructInstigator);
Damage *= 2.0;
}
else if ( bBoostersActivated )
Damage *= 1.5;
}
Super.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);
if ( (Role == ROLE_Authority) && (Health < 0) && (SelfDestructInstigator != None) && (EventInstigator != PC) )
{
if ( PC != None )
PC.ReceiveLocalizedMessage(class'UTLastSecondMessa ge', 1, PC.PlayerReplicationInfo, None, None);
if ( PlayerController(EventInstigator) != None )
{
PlayerController(EventInstigator).ReceiveLocalized Message(class'UTLastSecondMessage', 1, PC.PlayerReplicationInfo, None, None);
}
}
}
/** If exit while boosting, boost out of the vehicle
Try to exit above
*/
function bool FindAutoExit(Pawn ExitingDriver)
{
local vector X,Y,Z;
local float PlaceDist;
if ( bBoostersActivated )
{
GetAxes(Rotation, X,Y,Z);
Y *= -1;
PlaceDist = 150 + 4*ExitingDriver.GetCollisionHeight();
if ( TryExitPos(ExitingDriver, GetTargetLocation() + PlaceDist * Z, false) )
return true;
}
return Super.FindAutoExit(ExitingDriver);
}
//========================================
// AI Interface
function bool TooCloseToAttack(Actor Other)
{
if (Pawn(Other) != None && Vehicle(Other) == None)
{
return false;
}
return Super.TooCloseToAttack(Other);
}
function IncomingMissile(Projectile P)
{
local UTBot B;
B = UTBot(Controller);
if (Health < 200 && B != None && B.Skill > 4.0 + 4.0 * FRand() && VSize(P.Location - Location) < VSize(P.Velocity))
{
DriverLeave(false);
}
}
simulated function TeamChanged()
{
super.TeamChanged();
}
function OnSelfDestruct(UTSeqAct_SelfDestruct Action)
{
bScriptedBoosters = true;
SetTimer(0.5, true, 'CheckScriptedSelfDestruct');
}
function CheckScriptedSelfDestruct()
{
if ( ReadyToSelfDestruct() )
{
DriverLeave(true);
ClearTimer('CheckScriptedSelfDestruct');
bAISelfDestruct = false;
}
}
simulated event RigidBodyCollision( PrimitiveComponent HitComponent, PrimitiveComponent OtherComponent,
const out CollisionImpactData RigidCollisionData, int ContactIndex )
{
// only process rigid body collision if not hitting ground, or hitting at an angle
if ( (Abs(RigidCollisionData.ContactInfos[0].ContactNormal.Z) < WalkableFloorZ)
|| (Abs(RigidCollisionData.ContactInfos[0].ContactNormal dot vector(Rotation)) > 0.8)
|| (VSizeSq(Mesh.GetRootBodyInstance().PreviousVeloci ty) * GetCollisionDamageModifier(RigidCollisionData.Cont actInfos) > 5) )
{
super.RigidBodyCollision(HitComponent, OtherComponent, RigidCollisionData, ContactIndex);
}
}
simulated function CauseMuzzleFlashLight(int SeatIndex)
{
Super.CauseMuzzleFlashLight(SeatIndex);
//@FIXME: should have general code for this in UTVehicle
if (SeatIndex == 0)
{
VehicleEvent('MuzzleFlash');
}
}
/**
* We override here as the scorpion uttlery destroys itself when it blows up! So we need to turn off the damage effects as they
* are out of place just floating in the air.
**/
simulated function SetBurnOut()
{
Super.SetBurnOut();
if( DeathExplosion != none )
{
DeathExplosion.ParticleSystemComponent.DeactivateS ystem();
}
VehicleEvent( 'NoDamageSmoke' );
}
function bool IsGoodTowTruck()
{
return true;
}
function bool RecommendCharge(UTBot B, Pawn Enemy)
{
local UTVehicle V;
if ( Enemy.bCanFly )
{
return false;
}
V = UTVehicle(Enemy);
return (V == None) || V.ImportantVehicle() || (V.Health > 300);
}
/** Recommend high priority charge at enemy */
function bool CriticalChargeAttack(UTBot B)
{
return (UTVehicle(B.Enemy) != None) && RecommendCharge(B, B.Enemy);
}
/** returns true if vehicle should charge attack this node (also responsible for setting up charge) */
function bool ChargeAttackObjective(UTBot B, UTGameObjective O)
{
local vector FacingDir, EnemyDir;
local float Dist;
Dist = VSize(O.Location - Location);
if ( bAISelfDestruct || (Dist < 200.0) )
{
if ( !bTryToBoost )
bAISelfDestruct = false;
}
if ( !bAISelfDestruct )
{
// only charge if already facing right if close
FacingDir = vector(Rotation);
FacingDir.Z = 0;
EnemyDir = O.Location - Location;
EnemyDir.Z = 0;
bTryToBoost = (Normal(FacingDir) dot Normal(EnemyDir) > 0.9);
if ( bTryToBoost )
{
bAISelfDestruct = true;
SetTimer(0.3, true, 'CheckScriptedSelfDestruct');
}
if ( !bTryToBoost && (Dist < 600) )
return false;
}
B.GoalString = "Charge Objective";
return B.Squad.FindPathToObjective(B, O);
}
defaultproperties
{
Health=300
StolenAnnouncementIndex=5
COMOffset=(x=-40.0,y=0.0,z=-36.0)
UprightLiftStrength=280.0
UprightTime=1.25
UprightTorqueStrength=500.0
bCanFlip=true
bSeparateTurretFocus=true
bHasHandbrake=true
bStickDeflectionThrottle=true
GroundSpeed=950
AirSpeed=1100
RocketSpeed=2000
ObjectiveGetOutDist=1500.0
MaxDesireability=0.4
HeavySuspensionShiftPercent=0.75f;
bLookSteerOnNormalControls=true
bLookSteerOnSimpleControls=true
LookSteerSensitivity=2.2
LookSteerDamping=0.07
ConsoleSteerScale=1.1
DeflectionReverseThresh=-0.3
Begin Object Class=UTVehicleSimCar Name=SimObject
WheelSuspensionStiffness=100.0
WheelSuspensionDamping=3.0
WheelSuspensionBias=0.1
ChassisTorqueScale=0.0
MaxBrakeTorque=5.0
StopThreshold=100
LSDFactor=0.0
EngineBrakeFactor=0.025
ThrottleSpeed=0.2
WheelInertia=0.2
NumWheelsForFullSteering=4
SteeringReductionFactor=0.0
SteeringReductionMinSpeed=1100.0
SteeringReductionSpeed=1400.0
bAutoHandbrake=true
bClampedFrictionModel=true
FrontalCollisionGripFactor=0.18
ConsoleHardTurnGripFactor=1.0
HardTurnMotorTorque=0.7
End Object
SimObj=SimObject
Components.Add(SimObject)
lockSuspensionTravel=37;
lockSuspensionStiffness=62.5;
BoosterForceMagnitude=120.0
MaxBoostDuration=2.0
BoostChargeDuration=5.0
BoosterCheckRadius=150.0
BoostChargeTime=-9.0
BoostPowerSpeed=10000.0
TeamBeaconOffset=(z=60.0)
SpawnRadius=125.0
BaseEyeheight=30
Eyeheight=30
DefaultFOV=75
bLightArmor=true
CameraLag=0.08
bReducedFallingCollisionDamage=true
BoostReleaseDelay=0.15
SelfDestructSpeedSquared=810000.0
MomentumMult=0.5
NonPreferredVehiclePathMultiplier=1.5
HornIndex=0
}
Next class in next post.
class UW2Vehicle extends UW2Vehicle_Base
abstract;
/* lock player in car */
var bool bLockPlayerIn;
simulated event SetInputs(float InForward, float InStrafe, float InUp)
{
super.SetInputs(InForward, InStrafe, InUp);
LookSteer();
}
private simulated function LookSteer()
{
local bool bReverseThrottle;
local rotator SteerRot, VehicleRot;
local vector SteerDir, VehicleDir, AngVel;
local float VehicleHeading, SteerHeading, DeltaTargetHeading, Deflection;
Steering = FClamp(Steering * ConsoleSteerScale, -1.0, 1.0);
// If we desire 'look steering' on this vehicle, do it here.
if(IsHumanControlled())
{
// If there is a deflection, look at the angle that its point in.
Deflection = Sqrt(Throttle*Throttle + Steering*Steering);
if(bStickDeflectionThrottle)
{
// The region we consider 'reverse' is anything below DeflectionReverseThresh, or anything withing the triangle below the center position.
bReverseThrottle = ((Throttle < DeflectionReverseThresh) || (Throttle < 0.0 && Abs(Steering) < -Throttle));
Throttle = Deflection;
if(bReverseThrottle)
{
Throttle *= -1;
}
}
VehicleRot.Yaw = Rotation.Yaw;
VehicleDir = vector(VehicleRot);
SteerRot.Yaw = DriverViewYaw;
SteerDir = vector(SteerRot);
VehicleHeading = GetHeadingAngle(VehicleDir);
SteerHeading = GetHeadingAngle(SteerDir);
DeltaTargetHeading = FindDeltaAngle(SteerHeading, VehicleHeading);
if(DeltaTargetHeading > LookSteerDeadZone)
{
Steering = FMin((DeltaTargetHeading - LookSteerDeadZone) * LookSteerSensitivity, 1.0);
}
else if(DeltaTargetHeading < -LookSteerDeadZone)
{
Steering = FMax((DeltaTargetHeading + LookSteerDeadZone) * LookSteerSensitivity, -1.0);
}
else
{
Steering = 0.0;
}
AngVel = Mesh.BodyInstance.GetUnrealWorldAngularVelocity();
Steering = FClamp(Steering + (AngVel.Z * LookSteerDamping), -1.0, 1.0);
// Reverse steering when reversing
if (Throttle < 0.0 && ForwardVel < 0.0)
{
Steering = -1.0 * Steering;
}
}
}
defaultproperties
{
Health=2000
StolenAnnouncementIndex=5
COMOffset=(x=-40.0,y=0.0,z=-36.0)
UprightLiftStrength=280.0
UprightTime=1.25
UprightTorqueStrength=500.0
bCanFlip=true
bSeparateTurretFocus=true
bHasHandbrake=true
bStickDeflectionThrottle=true
GroundSpeed=7000
AirSpeed=7000
RocketSpeed=10000
ObjectiveGetOutDist=1500.0
MaxDesireability=0.4
HeavySuspensionShiftPercent=0.75f;
bLookSteerOnNormalControls=true
bLookSteerOnSimpleControls=true
LookSteerSensitivity=2.2
LookSteerDamping=0.07
ConsoleSteerScale=1.1
DeflectionReverseThresh=-0.3
lockSuspensionTravel=107;
lockSuspensionStiffness=62.5;
BoosterForceMagnitude=120.0
MaxBoostDuration=2.0
BoostChargeDuration=5.0
BoosterCheckRadius=150.0
BoostChargeTime=-9.0
BoostPowerSpeed=10000.0
TeamBeaconOffset=(z=60.0)
SpawnRadius=125.0
BaseEyeheight=30
Eyeheight=30
DefaultFOV=75
bLightArmor=true
bReducedFallingCollisionDamage=true
BoostReleaseDelay=0.15
SelfDestructSpeedSquared=810000.0
MomentumMult=0.5
NonPreferredVehiclePathMultiplier=1.5
HornIndex=0
bFollowLookDir=True
bLockPlayerIn=false
bTeamLocked = false
// Sounds
Begin Object Class=AudioComponent Name=ScorpionTireSound
SoundCue=SoundCue'A_Vehicle_Generic.Vehicle.Vehicl eSurface_TireDirt01Cue'
End Object
TireAudioComp=ScorpionTireSound
Components.Add(ScorpionTireSound);
TireSoundList(0)=(MaterialType=Dirt,Sound=SoundCue 'A_Vehicle_Generic.Vehicle.VehicleSurface_TireDirt 01Cue')
TireSoundList(1)=(MaterialType=Foliage,Sound=Sound Cue'A_Vehicle_Generic.Vehicle.VehicleSurface_TireF oliage01Cue')
TireSoundList(2)=(MaterialType=Grass,Sound=SoundCu e'A_Vehicle_Generic.Vehicle.VehicleSurface_TireGra ss01Cue')
TireSoundList(3)=(MaterialType=Metal,Sound=SoundCu e'A_Vehicle_Generic.Vehicle.VehicleSurface_TireMet al01Cue')
TireSoundList(4)=(MaterialType=Mud,Sound=SoundCue' A_Vehicle_Generic.Vehicle.VehicleSurface_TireMud01 Cue')
TireSoundList(5)=(MaterialType=Snow,Sound=SoundCue 'A_Vehicle_Generic.Vehicle.VehicleSurface_TireSnow 01Cue')
TireSoundList(6)=(MaterialType=Stone,Sound=SoundCu e'A_Vehicle_Generic.Vehicle.VehicleSurface_TireSto ne01Cue')
TireSoundList(7)=(MaterialType=Wood,Sound=SoundCue 'A_Vehicle_Generic.Vehicle.VehicleSurface_TireWood 01Cue')
TireSoundList(8)=(MaterialType=Water,Sound=SoundCu e'A_Vehicle_Generic.Vehicle.VehicleSurface_TireWat er01Cue')
WheelParticleEffects[0]=(MaterialType=Generic,ParticleTemplate=ParticleSy stem'Envy_Level_Effects_2.Vehicle_Dust_Effects.P_S corpion_Wheel_Dust')
WheelParticleEffects[1]=(MaterialType=Dirt,ParticleTemplate=ParticleSyste m'VH_Scorpion.Effects.PS_Wheel_Rocks')
WheelParticleEffects[2]=(MaterialType=Water,ParticleTemplate=ParticleSyst em'Envy_Level_Effects_2.Vehicle_Water_Effects.P_Sc orpion_Water_Splash')
WheelParticleEffects[3]=(MaterialType=Snow,ParticleTemplate=ParticleSyste m'Envy_Level_Effects_2.Vehicle_Snow_Effects.P_Scor pion_Wheel_Snow')
RedBoostCamAnim=CameraAnim'Camera_FX.VH_Scorpion.C _VH_Scorpion_Boost_Red'
///BlueBoostCamAnim=CameraAnim'Camera_FX.VH_Scorpion. C_VH_Scorpion_Boost_Blue'
// Wheel squealing sound.
Begin Object Class=AudioComponent Name=UnWheel2SquealSound
SoundCue=SoundCue'A_Vehicle_UnWheel2.SoundCues.A_V ehicle_UnWheel2_Slide'
End Object
SquealSound=UnWheel2SquealSound
Components.Add(UnWheel2SquealSound);
CollisionSound=SoundCue'A_Vehicle_Scorpion.SoundCu es.A_Vehicle_Scorpion_Collide'
EnterVehicleSound=SoundCue'A_Vehicle_Scorpion.Soun dCues.A_Vehicle_Scorpion_Start'
ExitVehicleSound=SoundCue'A_Vehicle_Scorpion.Sound Cues.A_Vehicle_Scorpion_Stop'
// Rocket booster sound.
Begin Object Class=AudioComponent Name=ScorpionBoosterSound
SoundCue=SoundCue'A_Powerup_Berzerk_EndCue'
End Object
BoosterSound=ScorpionBoosterSound
Components.Add(ScorpionBoosterSound);
// Initialize sound parameters.
SquealThreshold=0.1
SquealLatThreshold=0.02
LatAngleVolumeMult = 30.0
EngineStartOffsetSecs=2.0
EngineStopOffsetSecs=1.0
VehicleEffects(0)=(EffectStartTag=BoostStart,Effec tEndTag=BoostStop,EffectTemplate=ParticleSystem'VH _Scorpion.Effects.PS_Scorpion_Booster_Red',EffectT emplate_Blue=ParticleSystem'VH_Scorpion.Effects.PS _Scorpion_Booster',EffectSocket=Booster01)
VehicleEffects(1)=(EffectStartTag=BoostStart,Effec tEndTag=BoostStop,EffectTemplate=ParticleSystem'VH _Scorpion.Effects.PS_Scorpion_Booster_Red',EffectT emplate_Blue=ParticleSystem'VH_Scorpion.Effects.PS _Scorpion_Booster',EffectSocket=Booster02)
VehicleEffects(2)=(EffectStartTag=DamageSmoke,Effe ctEndTag=NoDamageSmoke,bRestartRunning=false,Effec tTemplate=ParticleSystem'Envy_Effects.Vehicle_Dama ge.P_Vehicle_Damage_1_Scorpion',EffectSocket=Damag eSmoke01)
// VehicleEffects(3)=(EffectStartTag=EngineStart,Effe ctEndTag=EngineStop,EffectTemplate=ParticleSystem' VH_Hellbender.Effects.P_VH_Hellbender_GenericExhau st',EffectSocket=ExhaustLeft)
// VehicleEffects(4)=(EffectStartTag=EngineStart,Effe ctEndTag=EngineStop,EffectTemplate=ParticleSystem' VH_Hellbender.Effects.P_VH_Hellbender_GenericExhau st',EffectSocket=ExhaustRight)
Begin Object class=PointLightComponent name=LeftRocketLight
Brightness=1
LightColor=(R=96,G=64,B=255,A=100)
Radius=1.0
CastShadows=false
bEnabled=false
Translation=(X=6,Z=-0)
End Object
LeftBoosterLight=LeftRocketLight
Begin Object class=PointLightComponent name=RightRocketLight
Brightness=1
LightColor=(R=96,G=64,B=255,A=100)
Radius=1.0
CastShadows=false
bEnabled=false
Translation=(X=6,Z=-00)
End Object
RightBoosterLight=RightRocketLight
SuspensionShiftSound=SoundCue'A_Vehicle_Generic.Ve hicle.VehicleCompressD_Cue'
bNoZDampingInAir=true
}
UnWheelModeller
02-09-2010, 08:11 AM
Last class is my UnWheel2 Vehicle code, as well as Xyx's LookSteer mouse steering code.
class UW2_Speedometer extends UW2Vehicle;
//------------------------------------------------------------------------------
// Instance vars.
//------------------------------------------------------------------------------
// Relative position of the status info on the HUD.
var(StatusHUD) vector2D StatusHUDTextPosition;
// Color of the status info on the HUD.
var(StatusHUD) color StatusHUDTextColor;
// Status HUD font size. Duh.
var(StatusHUD) int StatusHUDFontSize;
//------------------------------------------------------------------------------
// Constants.
//------------------------------------------------------------------------------
const MPHConversionFactor = 0.042612;
//------------------------------------------------------------------------------
// Events.
//------------------------------------------------------------------------------
simulated function DisplayExtraHud(UTHud Hud, Canvas Canvas, vector2D Position, float Width, float Height, int SeatIndex)
{
super.DisplayExtraHud(Hud, Canvas, Position, Width, Height, SeatIndex);
// Not while looking at the core destruction sequence.
if(WorldInfo.Game.MatchIsInProgress())
{
DisplayStatus(Canvas);
}
}
//------------------------------------------------------------------------------
// HUD.
//------------------------------------------------------------------------------
simulated private function DisplayStatus(Canvas Canvas)
{
local vector2d HudPosition;
Canvas.Font = PlayerController(Controller).MyHUD.GetFontSizeInde x(StatusHUDFontSize);
Canvas.DrawColor = StatusHUDTextColor;
HudPosition.X = Canvas.ClipX * StatusHUDTextPosition.X;
HudPosition.Y = Canvas.ClipY * StatusHUDTextPosition.Y;
Canvas.SetPos(HudPosition.X, HudPosition.Y);
// Draw a bit of nothing to get the SetPos to register properly, then
// SetPos again. Why is this needed?
Canvas.DrawText("");
Canvas.SetPos(HudPosition.X, HudPosition.Y);
// The canvas is now prepared for text.
DisplaySpeed(Canvas);
}
simulated private function DisplaySpeed(Canvas Canvas)
{
local float ForwardSpeed;
local int MPH;
ForwardSpeed = (Velocity << Rotation).X;
MPH = ForwardSpeed * MPHConversionFactor;
Canvas.DrawText(MPH $ " MPH");
}
//------------------------------------------------------------------------------
// Properties.
//------------------------------------------------------------------------------
defaultproperties
{
//------------------------------------------------------------------------------
// HUD.
//------------------------------------------------------------------------------
StatusHUDTextPosition=(X=0.41,Y=0.05)
StatusHUDTextColor=(R=120,G=255,B=100,A=400)
StatusHUDFontSize=4
}
crapageddon
02-09-2010, 02:09 PM
Anyone know how to determine/measure the wheelRadius?
Also my vehicle keeps crashing the udk when I attempt to exit it (press 'E'). Any ideas on the cause? Leads?
geodav
02-09-2010, 02:18 PM
Anyone know how to determine/measure the wheelRadius?
eyeball it in a map, you set it in the wheel class, no idea about your crash !!!
@UnWheelModeller amazing stuff there, thanks for sharing the info/code
UnWheelModeller
02-09-2010, 02:42 PM
Actually, I forgot the two classes, the one for each vehicle, and the wheel code;
/**
* Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
*/
class UW2Vehicle_FramePickup extends UW2_Speedometer;
defaultproperties
{
Begin Object Name=CollisionCylinder
CollisionHeight=40.0
CollisionRadius=100.0
Translation=(X=-25.0)
End Object
Begin Object Name=SVehicleMesh
SkeletalMesh=SkeletalMesh'VH_UW2_MonsterPickup.Mes h.SK_VHUW2_FramePickup_SH'
AnimTreeTemplate=AnimTree'VH_UW2_MonsterPickup.Ani ms.AT_VHUW2_MonsterPickup_SH'
PhysicsAsset=PhysicsAsset'VH_UW2_MonsterPickup.Mes h.PA_VHUW2_FramePickup_SH'
RBCollideWithChannels=(Default=TRUE,GameplayPhysic s=TRUE,EffectPhysics=TRUE,Vehicle=TRUE,Untitled4=T RUE)
End Object
DrawScale=1.2
Seats(0)={(
SeatIconPos=(X= 0.415,Y=-50000.5),
bSeatVisible=true,
CameraTag=BackViewSocket,
CameraBaseOffset=(X=-50.0),
CameraOffset=-175,
SeatBone=Main_Root,
SeatOffset=(X=84,Z=22,)
)}
DrivingPhysicalMaterial=PhysicalMaterial'VH_UW2_Mo nsterPickup.Materials.PM_VHUW2_FramePickup_SH'
COMOffset=(x=-4.0,y=0.0,z=-36.0)
Begin Object Class=UTVehicleSimCar Name=UW2SimObject
WheelSuspensionStiffness=80.0
WheelSuspensionDamping=2.0
WheelSuspensionBias=0.1
ChassisTorqueScale=0.0
MaxBrakeTorque=15.0
StopThreshold=200
MaxSteerAngleCurve=(Points=((InVal=0,OutVal=25),(I nVal=600.0,OutVal=20.0),(InVal=3100.0,OutVal=16.0) ,(InVal=4400.0,OutVal=12.0),(InVal=5000.0,OutVal=9 .0)))
SteerSpeed=110
LSDFactor=0.0
TorqueVSpeedCurve=(Points=((InVal=-590.0,OutVal=0.0),(InVal=-100.0,OutVal=28.0),(InVal=0.0,OutVal=55.0),(InVal= 350.0,OutVal=47.0),(InVal=5050.0,OutVal=10.0),(InV al=8150.0,OutVal=0.0)))
EngineRPMCurve=(Points=((InVal=-500.0,OutVal=2500.0),(InVal=0.0,OutVal=500.0),(InV al=1149.0,OutVal=8500.0),(InVal=1150.0,OutVal=2500 .0),(InVal=2149.0,OutVal=5500.0),(InVal=2150.0,Out Val=2500.0),(InVal=2850.0,OutVal=5500.0),(InVal=28 51.0,OutVal=2500.0),(InVal=3850.0,OutVal=5500.0),( InVal=3851.0,OutVal=2500.0),(InVal=4100.0,OutVal=5 500.0)))
EngineBrakeFactor=0.125
ThrottleSpeed=0.2
WheelInertia=0.2
NumWheelsForFullSteering=4
bAutoHandbrake=true
bClampedFrictionModel=true
FrontalCollisionGripFactor=0.18
ConsoleHardTurnGripFactor=1.0
HardTurnMotorTorque=0.0
MinHardTurnSpeed=99999.0 //never hard turn
SpeedBasedTurnDamping=180.0
AirControlTurnTorque=0.0
InAirUprightMaxTorque=0.0
InAirUprightTorqueFactor=0.0
// Longitudinal tire model based on 10% slip ratio peak
WheelLongExtremumSlip=0.1
WheelLongExtremumValue=1.0
WheelLongAsymptoteSlip=2.0
WheelLongAsymptoteValue=0.6
// Lateral tire model based on slip angle (radians)
WheelLatExtremumSlip=0.35 // 20 degrees
WheelLatExtremumValue=0.9
WheelLatAsymptoteSlip=1.4 // 80 degrees
WheelLatAsymptoteValue=0.9
bAutoDrive=false
AutoDriveSteer=0.3
End Object
SimObj=UW2SimObject
Components.Add(UW2SimObject)
Begin Object Class=UW2VehicleWheel Name=UW2RRWheel
BoneName="B_R_Tire"
LatSlipFactor=1.20
SkelControlName="B_R_Tire_Cont"
WheelRadius=48
End Object
Wheels(0)=UW2RRWheel
Begin Object Class=UW2VehicleWheel Name=UW2LRWheel
BoneName="B_L_Tire"
LatSlipFactor=1.20
SkelControlName="B_L_Tire_Cont"
WheelRadius=48
End Object
Wheels(1)=UW2LRWheel
Begin Object Class=UW2VehicleWheel Name=UW2RFWheel
BoneName="F_R_Tire"
SteerFactor=1.0
SkelControlName="F_R_Tire_Cont"
WheelRadius=48
End Object
Wheels(2)=UW2RFWheel
Begin Object Class=UW2VehicleWheel Name=UW2LFWheel
BoneName="F_L_Tire"
SteerFactor=1.0
SkelControlName="F_L_Tire_Cont"
WheelRadius=48
End Object
Wheels(3)=UW2LFWheel
// Engine sound.
Begin Object Class=AudioComponent Name=UnWheel2EngineSound
SoundCue=SoundCue'A_Vehicle_UnWheel2.SoundCues.A_V ehicle_FramePickup_EngineLoop'
End Object
EngineSound=UnWheel2EngineSound
Components.Add(UnWheel2EngineSound);
// Absolute max physics speed
MaxSpeed=8500
// Inertia Tensor
InertiaTensorMultiplier=(x=1.0,y=1.0,z=1.0)
}
class UW2VehicleWheel extends UTVehicleWheel;
defaultproperties
{
SuspensionTravel=77
bPoweredWheel=true
SteerFactor=0.0
LongSlipFactor=2.0
LatSlipFactor=1.50
HandbrakeLongSlipFactor=0.8
HandbrakeLatSlipFactor=0.8
ParkedSlipFactor=10.0
bUseMaterialSpecificEffects=true
}
If you look at the LatSlipFactor, you will notice the front and rear wheels use a different setting. This will let the vehicle spin out properly.
Frame Pickup Vehicle factory;
/**
* Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
*/
class UW2VehicleFactory_FramePickup extends UTVehicleFactory;
defaultproperties
{
Begin Object Name=SVehicleMesh
SkeletalMesh=SkeletalMesh'VH_UW2_MonsterPickup.Mes h.SK_VHUW2_FramePickup_SH'
Translation=(X=0.0,Y=0.0,Z=-70.0) // -60 seems about perfect for exact alignment, -70 for some 'lee way'
End Object
Components.Remove(Sprite)
Begin Object Name=CollisionCylinder
CollisionHeight=+80.0
CollisionRadius=+120.0
Translation=(X=-45.0,Y=0.0,Z=-10.0)
End Object
VehicleClassPath="UW2_Content.UW2Vehicle_FramePickup"
DrawScale=1.2
}
Spoondog
02-09-2010, 05:42 PM
Thanks a ton Unwheel! :)
Th3ProphetMan
02-10-2010, 11:20 AM
Anyone know how to determine/measure the wheelRadius?
Also my vehicle keeps crashing the udk when I attempt to exit it (press 'E'). Any ideas on the cause? Leads?
Good news, i have a possible solution to your problem: redoing my scripts i ran into your problem so i started to compare the script with the one i had before which didn't crash.
In UTVehicleHumvee.uc (or however you renamed the file, look at the middle of the file line 560 aprox:
function DriverLeft()
{
if ( ReadyToSelfDestruct() )
{
SelfDestructInstigator = (Driver != none) ? Driver.Controller : None;
bShouldEject = true;
if ( PlayerController(SelfDestructInstigator) != None )
{
PlayerController(SelfDestructInstigator).ClientPla ySound(EjectSoundCue);
}
BoostStartTime = WorldInfo.TimeSeconds - MaxBoostDuration + 1.0;
bSelfDestructArmed = true;
PlaySelfDestruct();
}
Super.DriverLeft();
}
Try commenting out this whole function, that fixes the problem for me.
Hope that helps.
I still have the game crashing if i try to load maps with my car but haven't found the problem, problem is i'm running out of ideas :/ If you could PM me your scripts so i can compare maybe it would help, if you didn't use the simplecar tutorial scripts as base or if you edited them in any particular way other than changing the names..
crapageddon
02-10-2010, 07:14 PM
How to I comment out the block?
is this right:
//*
function DriverLeft()
{
if ( ReadyToSelfDestruct() )
{
SelfDestructInstigator = (Driver != none) ? Driver.Controller : None;
bShouldEject = true;
if ( PlayerController(SelfDestructInstigator) != None )
{
PlayerController(SelfDestructInstigator).ClientPla ySound(EjectSoundCue);
}
BoostStartTime = WorldInfo.TimeSeconds - MaxBoostDuration + 1.0;
bSelfDestructArmed = true;
PlaySelfDestruct();
}
Super.DriverLeft();
}
*/
My code isn't turning green when I do this.
Th3ProphetMan
02-10-2010, 08:21 PM
No, instead of //* you have to start the comment with /** and close with */
If you look a fairly big script you will find multiline comments like that
If you use // it will only comment one line
Coloring depends on your text editor.
Also my car doesnt work at all with the february beta, or so it looks, however i do get a log now, i looked and i saw a critical error saying it cant bind native class so i removed the native bit and now i get another error, i'll post the log tomorrow just in case anyone can help :'(
crapageddon
02-10-2010, 08:47 PM
Ok sorry - I'm just orienting myself to unrealScript.
I was actually going to dive in and start trying to weed out the 'scorpion specific' bits of code to attempt creating a very simple 4 wheel vehicle w/ no extras class. Basically just a car that drives and has a clear area to upload different meshes as well as change the min/max speeds and other basic settings. I'll let you know what I find as I do that too - I think we should be able to help each other out a lot on this.
MagnumAI
02-10-2010, 08:56 PM
I haven't had time to look at the scripts or download the Feb build. But on the update/changes page they mention moving some classes from native. So it's possible the code is calling something that has changed in the latest build.
geodav
02-11-2010, 01:46 PM
just read there has been changes to the wheel code which is problely why my game crash now !!!!!
btw they have changed the simobjects as well
check in the Development\Src\UDKBase folder for the new code files if your using the feb release
UnWheelModeller
02-11-2010, 09:21 PM
Could one of you coders look at this code, and tell my why it won't work in UDK.
It works in UT3, but not UDK.
class UW2_Speedometer extends UW2Vehicle;
//------------------------------------------------------------------------------
// Instance vars.
//------------------------------------------------------------------------------
// Relative position of the status info on the HUD.
var(StatusHUD) vector2D StatusHUDTextPosition;
// Color of the status info on the HUD.
var(StatusHUD) color StatusHUDTextColor;
// Status HUD font size. Duh.
var(StatusHUD) int StatusHUDFontSize;
//------------------------------------------------------------------------------
// Constants.
//------------------------------------------------------------------------------
const MPHConversionFactor = 0.042612;
//------------------------------------------------------------------------------
// Events.
//------------------------------------------------------------------------------
simulated function DisplayExtraHud(UTHud Hud, Canvas Canvas, vector2D Position, float Width, float Height, int SeatIndex)
{
super.DisplayExtraHud(Hud, Canvas, Position, Width, Height, SeatIndex);
// Not while looking at the core destruction sequence.
if(WorldInfo.Game.MatchIsInProgress())
{
DisplayStatus(Canvas);
}
}
//------------------------------------------------------------------------------
// HUD.
//------------------------------------------------------------------------------
simulated private function DisplayStatus(Canvas Canvas)
{
local vector2d HudPosition;
Canvas.Font = PlayerController(Controller).MyHUD.GetFontSizeInde x(StatusHUDFontSize);
Canvas.DrawColor = StatusHUDTextColor;
HudPosition.X = Canvas.ClipX * StatusHUDTextPosition.X;
HudPosition.Y = Canvas.ClipY * StatusHUDTextPosition.Y;
Canvas.SetPos(HudPosition.X, HudPosition.Y);
// Draw a bit of nothing to get the SetPos to register properly, then
// SetPos again. Why is this needed?
Canvas.DrawText("");
Canvas.SetPos(HudPosition.X, HudPosition.Y);
// The canvas is now prepared for text.
DisplaySpeed(Canvas);
}
simulated private function DisplaySpeed(Canvas Canvas)
{
local float ForwardSpeed;
local int MPH;
ForwardSpeed = (Velocity << Rotation).X;
MPH = ForwardSpeed * MPHConversionFactor;
Canvas.DrawText(MPH $ " MPH");
}
//------------------------------------------------------------------------------
// Properties.
//------------------------------------------------------------------------------
defaultproperties
{
//------------------------------------------------------------------------------
// HUD.
//------------------------------------------------------------------------------
StatusHUDTextPosition=(X=0.41,Y=0.05)
StatusHUDTextColor=(R=120,G=255,B=100,A=400)
StatusHUDFontSize=4
}
Th3ProphetMan
02-12-2010, 04:49 PM
just read there has been changes to the wheel code which is problely why my game crash now !!!!!
btw they have changed the simobjects as well
check in the Development\Src\UDKBase folder for the new code files if your using the feb release
Well i guess i'm goind to compare the original files with the new UDKBase and with the ones in the simple car tutorial and see if i can get something to work :S
Th3ProphetMan
02-13-2010, 12:10 PM
Ok i got it to work on FEB UDK Beta, or at least it seems to work now.
Mainly i looked at the feb udk files and compared to see what had to be changed from UT to UDKbase and removed some native function. I have also change some health and similar values that were adjusted to my car but those should be easier to adjust to your vehicle.
I'll post my scripts here in case anyone wants them, you can also open them in a good text/code editor like notepad++ and make a compare to see all differences with yours and adapt yours instead you you can keep any changes you did yourself to your scripts.
Vehicle_Factory_Sophia.uc
/**
* Copyright 1998-2009 Epic Games, Inc. All Rights Reserved.
*/
class Vehicle_Factory_Sophia extends UTVehicleFactory;
defaultproperties
{
Begin Object Name=SVehicleMesh
SkeletalMesh=SkeletalMesh'VH_Sophia1.Mesh.SK_VH_So phia'
Translation=(X=0.0,Y=0.0,Z=-40.0)
End Object
Components.Remove(Sprite)
VehicleClassPath="MyMod.Vehicle_Sophia_Content"
DrawScale=1.2
}
Vehicle_Sophia_Content.uc
/**
* Copyright 1998-2009 Epic Games, Inc. All Rights Reserved.
*/
class Vehicle_Sophia_Content extends Vehicle_Sophia;
defaultproperties
{
Begin Object Name=SVehicleMesh
SkeletalMesh=SkeletalMesh'VH_Sophia1.Mesh.SK_VH_So phia'
AnimTreeTemplate=AnimTree'VH_Sophia1.Anims.AT_VH_S ophia'
PhysicsAsset=PhysicsAsset'VH_Sophia1.Mesh.PA_VH_So phia'
RBCollideWithChannels=(Default=TRUE,BlockingVolume =TRUE,GameplayPhysics=TRUE,EffectPhysics=TRUE,Vehi cle=TRUE,Untitled4=TRUE)
End Object
DrawScale=1.2
IconCoords=(U=831,UL=21,V=39,VL=29)
BoostToolTipIconCoords=(U=0,UL=101,V=841,VL=49)
EjectToolTipIconCoords=(U=93,UL=46,V=316,VL=52)
BrakeLightParameterName=Brake_Light
ReverseLightParameterName=Reverse_Light
HeadLightParameterName=Green_Glows_Headlights
Seats(0)={( GunClass=class'UTVWeap_ScorpionTurret',
//GunSocket=(TurretFireSocket),
//GunPivotPoints=(gun_rotate),
//TurretVarPrefix="",
//TurretControls=(TurretRotate),
SeatIconPos=(X= 0.415,Y=0.5),
//CameraTag=GunViewSocket,
CameraBaseOffset=(X=-50.0),
CameraOffset=-175,
//WeaponEffects=((SocketName=TurretFireSocket,Offset =(X=-14,Y=5),Scale3D=(X=2.0,Y=3.0,Z=3.0)),(SocketName=T urretFireSocket,Offset=(X=-14,Y=-5),Scale3D=(X=2.0,Y=3.0,Z=3.0)))
)}
// Sounds
// Engine sound.
Begin Object Class=AudioComponent Name=ScorpionEngineSound
SoundCue=SoundCue'A_Vehicle_Scorpion.SoundCues.A_V ehicle_Scorpion_EngineLoop'
End Object
EngineSound=ScorpionEngineSound
Components.Add(ScorpionEngineSound);
Begin Object Class=AudioComponent Name=ScorpionTireSound
SoundCue=SoundCue'A_Vehicle_Generic.Vehicle.Vehicl eSurface_TireDirt01Cue'
End Object
TireAudioComp=ScorpionTireSound
Components.Add(ScorpionTireSound);
TireSoundList(0)=(MaterialType=Dirt,Sound=SoundCue 'A_Vehicle_Generic.Vehicle.VehicleSurface_TireDirt 01Cue')
TireSoundList(1)=(MaterialType=Foliage,Sound=Sound Cue'A_Vehicle_Generic.Vehicle.VehicleSurface_TireF oliage01Cue')
TireSoundList(2)=(MaterialType=Grass,Sound=SoundCu e'A_Vehicle_Generic.Vehicle.VehicleSurface_TireGra ss01Cue')
TireSoundList(3)=(MaterialType=Metal,Sound=SoundCu e'A_Vehicle_Generic.Vehicle.VehicleSurface_TireMet al01Cue')
TireSoundList(4)=(MaterialType=Mud,Sound=SoundCue' A_Vehicle_Generic.Vehicle.VehicleSurface_TireMud01 Cue')
TireSoundList(5)=(MaterialType=Snow,Sound=SoundCue 'A_Vehicle_Generic.Vehicle.VehicleSurface_TireSnow 01Cue')
TireSoundList(6)=(MaterialType=Stone,Sound=SoundCu e'A_Vehicle_Generic.Vehicle.VehicleSurface_TireSto ne01Cue')
TireSoundList(7)=(MaterialType=Wood,Sound=SoundCue 'A_Vehicle_Generic.Vehicle.VehicleSurface_TireWood 01Cue')
TireSoundList(8)=(MaterialType=Water,Sound=SoundCu e'A_Vehicle_Generic.Vehicle.VehicleSurface_TireWat er01Cue')
WheelParticleEffects[0]=(MaterialType=Generic,ParticleTemplate=ParticleSy stem'Envy_Level_Effects_2.Vehicle_Dust_Effects.P_S corpion_Wheel_Dust')
WheelParticleEffects[1]=(MaterialType=Dirt,ParticleTemplate=ParticleSyste m'VH_Scorpion.Effects.PS_Wheel_Rocks')
WheelParticleEffects[2]=(MaterialType=Water,ParticleTemplate=ParticleSyst em'Envy_Level_Effects_2.Vehicle_Water_Effects.P_Sc orpion_Water_Splash')
WheelParticleEffects[3]=(MaterialType=Snow,ParticleTemplate=ParticleSyste m'Envy_Level_Effects_2.Vehicle_Snow_Effects.P_Scor pion_Wheel_Snow')
// Wheel squealing sound.
Begin Object Class=AudioComponent Name=ScorpionSquealSound
SoundCue=SoundCue'A_Vehicle_Scorpion.SoundCues.A_V ehicle_Scorpion_Slide'
End Object
SquealSound=ScorpionSquealSound
Components.Add(ScorpionSquealSound);
CollisionSound=SoundCue'A_Vehicle_Scorpion.SoundCu es.A_Vehicle_Scorpion_Collide'
EnterVehicleSound=SoundCue'A_Vehicle_Scorpion.Soun dCues.A_Vehicle_Scorpion_Start'
ExitVehicleSound=SoundCue'A_Vehicle_Scorpion.Sound Cues.A_Vehicle_Scorpion_Stop'
// Initialize sound parameters.
SquealThreshold=0.1
SquealLatThreshold=0.02
LatAngleVolumeMult = 30.0
EngineStartOffsetSecs=2.0
EngineStopOffsetSecs=1.0
//VehicleEffects(2)=(EffectStartTag=DamageSmoke,Effe ctEndTag=NoDamageSmoke,bRestartRunning=false,Effec tTemplate=ParticleSystem'Envy_Effects.Vehicle_Dama ge.P_Vehicle_Damage_1_Scorpion',EffectSocket=Damag eSmoke01)
//VehicleEffects(3)=(EffectStartTag=MuzzleFlash,Effe ctTemplate=ParticleSystem'VH_Scorpion.Effects.PS_S corpion_Gun_MuzzleFlash_Red',EffectTemplate_Blue=P articleSystem'VH_Scorpion.Effects.PS_Scorpion_Gun_ MuzzleFlash',EffectSocket=TurretFireSocket)
FlagOffset=(X=-60.0,Y=25,Z=40)
SelfDestructWarningSound=SoundCue'A_Vehicle_Scorpi on.SoundCues.A_Vehicle_Scorpion_DestructionWarning _Cue'
SelfDestructReadyCue=SoundCue'A_Vehicle_Scorpion.S oundCues.A_Vehicle_Scorpion_EjectReadyBeep_Cue'
SelfDestructEnabledSound=SoundCue'A_Vehicle_Scorpi on.SoundCues.A_Vehicle_Scorpion_EngineThrustStart_ Cue'
SelfDestructEnabledLoop=SoundCue'A_Vehicle_Scorpio n.SoundCues.A_Vehicle_Scorpion_EngineThrustLoop_Cu e'
ExplosionSound=SoundCue'A_Vehicle_Scorpion.SoundCu es.A_Vehicle_Scorpion_Explode'
SuspensionShiftSound=SoundCue'A_Vehicle_Generic.Ve hicle.VehicleCompressD_Cue'
BurnOutMaterial[0]=MaterialInterface'VH_Scorpion.Materials.MITV_VH_S corpion_Red_BO'
BurnOutMaterial[1]=MaterialInterface'VH_Scorpion.Materials.MITV_VH_S corpion_Blue_BO'
SelfDestructExplosionTemplate=ParticleSystem'VH_Sc orpion.Effects.P_VH_Scorpion_SelfDestruct'
HatchGibClass=class'UTGib_ScorpionHatch'
BigExplosionTemplates[0]=(Template=ParticleSystem'Envy_Effects.VH_Deaths.P _VH_Death_SMALL_Far',MinDistance=350)
BigExplosionTemplates[1]=(Template=ParticleSystem'Envy_Effects.VH_Deaths.P _VH_Death_SMALL_Near')
BigExplosionSocket=VH_Death
HudCoords=(U=410,V=112,UL=-86,VL=109)
bHasEnemyVehicleSound=true
EnemyVehicleSound(0)=SoundNodeWave'A_Character_Rea per.BotStatus.A_BotStatus_Reaper_EnemyScorpion'
}
(continues in next post)
Th3ProphetMan
02-13-2010, 12:13 PM
Vehicle_Sophia.uc
/**
* Copyright 1998-2009 Epic Games, Inc. All Rights Reserved.
*/
class Vehicle_Sophia extends UTVehicle
abstract;
/** Internal variable. Maintains brake light state to avoid extraMatInst calls. */
var bool bBrakeLightOn;
/** Internal variable. Maintains reverse light state to avoid extra MatInst calls. */
var bool bReverseLightOn;
/** Internal variable. Maintains headlight state to avoid extra MatInst calls. */
var bool bHeadlightsOn;
/** material parameter that should be modified to turn the brake lights on and off */
var name BrakeLightParameterName;
/** material parameter that should be modified to turn the reverse lights on and off */
var name ReverseLightParameterName;
/** material parameter that should be modified to turn the headlights on and off */
var name HeadLightParameterName;
/** If true, steering is very limited (enabled while boosting) */
var bool bSteeringLimited;
var Controller SelfDestructInstigator;
/** Coordinates for the boost tooltip textures */
var UIRoot.TextureCoordinates BoostToolTipIconCoords;
/** Coordinates for the eject tooltip textures */
var UIRoot.TextureCoordinates EjectToolTipIconCoords;
var class<UTDamageType> SelfDestructDamageType;
var SoundCue SelfDestructSoundCue;
var SoundCue SelfDestructReadyCue;
var SoundCue SelfDestructWarningSound;
var SoundCue SelfDestructEnabledSound;
var SoundCue SelfDestructEnabledLoop;
/** Sound played whenever Suspension moves suddenly */
var SoundCue SuspensionShiftSound;
var AudioComponent SelfDestructEnabledComponent;
var AudioComponent SelfDestructWarningComponent;
var AudioComponent SelfDestructReadyComponent;
var SoundCue EjectSoundCue;
/** replicated flag indicating when self destruct is activated */
var repnotify bool bSelfDestructArmed;
/** double tap forward to start rocket boosters */
var bool bWasThrottle;
var float ThrottleStartTime;
var float DefaultUprightTorqueFactor;
var float DefaultUprightMaxTorque;
/** dynamic light */
var PointLightComponent LeftBoosterLight, RightBoosterLight;
var RB_ConstraintActor BladeVictimConstraint[2];
/** Rocket speed is the (clamped) max speed while boosting */
var float RocketSpeed;
/** Square of minimum speed needed to engage self destruct */
var float SelfDestructSpeedSquared;
/** How long the springs should be when the wheels need to be locked to the ground */
var() float LockSuspensionTravel;
/** How stiff the suspension should be when the wheels need to be locked to the ground */
var() float LockSuspensionStiffness;
/** swap BigExplosionTemplate for this when self-destructing */
var ParticleSystem SelfDestructExplosionTemplate;
var class<UTGib> HatchGibClass;
var bool bAISelfDestruct;
/**
* Returns true if self destruct conditions (boosting, going fast enough) are met
*/
function bool ReadyToSelfDestruct()
{
return ((VSizeSq(Velocity) > SelfDestructSpeedSquared));
}
function bool EagleEyeTarget()
{
return ReadyToSelfDestruct();
}
simulated function PostBeginPlay()
{
Super.PostBeginPlay();
if(SimObj.bAutoDrive)
{
SetDriving(true);
}
if (WorldInfo.NetMode != NM_DedicatedServer && !bDeleteMe && DamageMaterialInstance[0] != none)
{
// turn off headlights
DamageMaterialInstance[0].SetScalarParameterValue('Green_Glows_Headlights', 0.f );
}
}
/**
* RanInto() called for encroaching actors which successfully moved the other actor out of the way
*
* @param Other The pawn that was hit
*/
event RanInto(Actor Other)
{
super.RanInto(Other);
}
function PancakeOther(Pawn Other)
{
super.PancakeOther(Other);
}
/**
* Are we allowing this Pawn to be based on us?
*/
simulated function bool CanBeBaseForPawn(Pawn APawn)
{
return bCanBeBaseForPawns && !bDriving;
}
/** DriverEnter()
Make Pawn P the new driver of this vehicle
*/
function bool DriverEnter(Pawn P)
{
local Pawn BasedPawn;
if ( super.DriverEnter(P) )
{
ForEach BasedActors(class'Pawn', BasedPawn)
{
if(BasedPawn != Driver)
{
BasedPawn.JumpOffPawn();
}
}
return true;
}
return false;
}
simulated function SetInputs(float InForward, float InStrafe, float InUp)
{
Super.SetInputs(InForward, InStrafe, InUp);
}
simulated function StopVehicleSounds()
{
super.StopVehicleSounds();
}
simulated event SuspensionHeavyShift(float Delta)
{
if(Delta>0)
{
PlaySound(SuspensionShiftSound);
}
}
/**
when called makes the wheels stick to the ground more
*/
simulated function LockWheels()
{
local SVehicleSimCar SimCar;
bSteeringLimited = true;
SimCar = SVehicleSimCar(SimObj);
Wheels[0].SuspensionTravel = LockSuspensionTravel;
Wheels[1].SuspensionTravel = LockSuspensionTravel;
SimCar.WheelSuspensionStiffness= LockSuspensionStiffness;
}
/**
Resets the variables that are changed in the LockWheels call
*/
simulated function UnlockWheels()
{
local SVehicleSimCar SimCar;
bSteeringLimited = false;
SimCar = SVehicleSimCar(SimObj);
Wheels[0].SuspensionTravel = Default.Wheels[0].SuspensionTravel;
Wheels[1].SuspensionTravel = Default.Wheels[1].SuspensionTravel;
SimCar.WheelSuspensionStiffness = SVehicleSimCar(Default.SimObj).WheelSuspensionStif fness;
}
/** DeactivateHandbrake()
called (usually by a timer) to deactivate the handbrake
*/
simulated function DeactivateHandbrake()
{
bOutputHandbrake = FALSE;
bHoldingDownHandbrake = FALSE;
}
simulated event EnableFullSteering()
{
local SVehicleSimCar SimCar;
bSteeringLimited = false;
SimCar = SVehicleSimCar(SimObj);
SimCar.MaxSteerAngleCurve.Points[0].OutVal = SVehicleSimCar(Default.SimObj).MaxSteerAngleCurve. Points[0].OutVal;
SimCar.MaxSteerAngleCurve.Points[1].OutVal = SVehicleSimCar(Default.SimObj).MaxSteerAngleCurve. Points[1].OutVal;
SimCar.MaxSteerAngleCurve.Points[2].OutVal = SVehicleSimCar(Default.SimObj).MaxSteerAngleCurve. Points[2].OutVal;
}
simulated function float AdjustFOVAngle(float FOVAngle)
{
}
/** Self destruct immediately if activated and hit by EMP */
simulated function bool DisableVehicle()
{
local bool bResult;
bResult = super.DisableVehicle();
if ( SelfDestructInstigator != None )
{
SelfDestruct(None);
return true;
}
return bResult;
}
simulated function BlowupVehicle()
{
Super.BlowupVehicle();
}
event SelfDestruct(Actor ImpactedActor)
{
Health = -100000;
if(SelfDestructWarningComponent != none)
{
SelfDestructWarningComponent.Stop();
}
if(SelfDestructEnabledComponent != none)
{
SelfDestructEnabledComponent.Stop();
}
KillerController = SelfDestructInstigator;
BlowUpVehicle();
if ( ImpactedActor != None )
{
ImpactedActor.TakeDamage(600, SelfDestructInstigator, GetTargetLocation(), 200000 * Normal(Velocity), SelfDestructDamageType,, self);
}
HurtRadius(600,600, SelfDestructDamageType, 200000, GetTargetLocation(), ImpactedActor, SelfDestructInstigator);
PlaySound(SelfDestructSoundCue);
}
// The pawn Driver has tried to take control of this vehicle
function bool TryToDrive(Pawn P)
{
return (SelfDestructInstigator == None) && Super.TryToDrive(P);
}
simulated function bool OverrideBeginFire(byte FireModeNum)
{
if (FireModeNum == 1)
{
}
return false;
}
simulated function bool OverrideEndFire(byte FireModeNum)
{
if (FireModeNum == 1)
{
}
return false;
}
simulated function PlaySelfDestruct()
{
local UTGib HatchGib;
local SkelControlBase SkelControl;
DeadVehicleLifeSpan = BurnOutTime + 0.01;
UDKVehicleSimCar(SimObj).bDriverlessBraking = false;
// play sound
PlaySound(SelfDestructEnabledSound);
if(SelfDestructWarningComponent == none)
{
SelfDestructWarningComponent = CreateAudioComponent(SelfDestructWarningSound, FALSE, TRUE);
if ( SelfDestructWarningComponent != None )
{
SelfDestructWarningComponent.Location = Location;
SelfDestructWarningComponent.bUseOwnerLocation = true;
AttachComponent(SelfDestructWarningComponent);
}
}
if ( SelfDestructWarningComponent != None )
{
SelfDestructWarningComponent.Play();
}
if(SelfDestructEnabledComponent == None)
{
SelfDestructEnabledComponent = CreateAudioComponent(SelfDestructEnabledLoop, FALSE, TRUE);
if ( SelfDestructEnabledComponent != None )
{
SelfDestructEnabledComponent.Location = Location;
SelfDestructEnabledComponent.bUseOwnerLocation = true;
AttachComponent(SelfDestructEnabledComponent);
}
}
if ( SelfDestructEnabledComponent != None )
{
SelfDestructEnabledComponent.FadeIn(1.0f,1.0f);
}
// blow off the hatch
SkelControl = Mesh.FindSkelControl('Hatch');
if (SkelControl != None)
{
SkelControl.BoneScale = 0.0;
HatchGib = Spawn(HatchGibClass, self,, Mesh.GetBoneLocation('Hatch_Slide'), rot(0,0,0));
if(HatchGib != none)
{
HatchGib.Velocity = 0.25*Velocity;
HatchGib.Velocity.Z = 400.0;
HatchGib.GibMeshComp.WakeRigidBody();
HatchGib.GibMeshComp.SetRBLinearVelocity(HatchGib. Velocity, false);
}
}
BigExplosionTemplates.length = 1;
BigExplosionTemplates[0].Template = SelfDestructExplosionTemplate;
BigExplosionTemplates[0].MinDistance = 0.0;
}
simulated function DisplayHud(UTHud Hud, Canvas Canvas, vector2D HudPOS, optional int SeatIndex)
{
local PlayerController PC;
super.DisplayHud(HUD, Canvas, HudPOS, SeatIndex);
PC = PlayerController(Seats[0].SeatPawn.Controller);
if (PC != none)
{
}
}
/**
* Extra damage if hit while boosting
*/
simulated event TakeDamage(int Damage, Controller EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser)
{
local PlayerController PC;
if (Role == ROLE_Authority)
{
if ( SelfDestructInstigator != None )
{
PC = PlayerController(SelfDestructInstigator);
Damage *= 2.0;
}
}
Super.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);
if ( (Role == ROLE_Authority) && (Health < 0) && (SelfDestructInstigator != None) && (EventInstigator != PC) )
{
if ( PC != None )
PC.ReceiveLocalizedMessage(class'UTLastSecondMessa ge', 1, PC.PlayerReplicationInfo, None, None);
if ( PlayerController(EventInstigator) != None )
{
PlayerController(EventInstigator).ReceiveLocalized Message(class'UTLastSecondMessage', 1, PC.PlayerReplicationInfo, None, None);
}
}
}
/** If exit while boosting, boost out of the vehicle
Try to exit above
*/
function bool FindAutoExit(Pawn ExitingDriver)
{
return Super.FindAutoExit(ExitingDriver);
}
//========================================
// AI Interface
function byte ChooseFireMode()
{
local UTVehicle V;
local float Dist;
if ( bAISelfDestruct )
{
return 0;
}
if ( Pawn(Controller.Focus) != None && Controller.MoveTarget == Controller.Focus
&& Controller.InLatentExecution(Controller.LATENT_MOV ETOWARD) )
{
V = UTVehicle(Controller.Focus);
if ( V == None )
{
Dist = VSize(Controller.GetFocalPoint() - Location);
if ( Dist < 1200.0 && Controller.LineOfSightTo(Controller.Focus) )
{
return 1;
}
}
else if ( (V.Health > 300 || V.ImportantVehicle()) && Controller.LineOfSightTo(Controller.Focus) )
{
// self destruct to take out highly armored vehicle
bAISelfDestruct = true;
SetTimer(0.3, true, 'CheckScriptedSelfDestruct');
}
}
return 0;
}
function bool TooCloseToAttack(Actor Other)
{
if (Pawn(Other) != None && Vehicle(Other) == None)
{
return false;
}
return Super.TooCloseToAttack(Other);
}
function IncomingMissile(Projectile P)
{
local UTBot B;
B = UTBot(Controller);
if (Health < 200 && B != None && B.Skill > 4.0 + 4.0 * FRand() && VSize(P.Location - Location) < VSize(P.Velocity))
{
DriverLeave(false);
}
}
simulated function TeamChanged()
{
super.TeamChanged();
// clear out the flags since we have a new material:
bBrakeLightOn = false;
bReverseLightOn = false;
bHeadlightsOn=false;
}
function OnSelfDestruct(UTSeqAct_SelfDestruct Action)
{
SetTimer(0.5, true, 'CheckScriptedSelfDestruct');
}
function CheckScriptedSelfDestruct()
{
if ( ReadyToSelfDestruct() )
{
DriverLeave(true);
ClearTimer('CheckScriptedSelfDestruct');
bAISelfDestruct = false;
}
}
simulated event RigidBodyCollision( PrimitiveComponent HitComponent, PrimitiveComponent OtherComponent,
const out CollisionImpactData RigidCollisionData, int ContactIndex )
{
// only process rigid body collision if not hitting ground, or hitting at an angle
if ( (Abs(RigidCollisionData.ContactInfos[0].ContactNormal.Z) < WalkableFloorZ)
|| (Abs(RigidCollisionData.ContactInfos[0].ContactNormal dot vector(Rotation)) > 0.8)
|| (VSizeSq(Mesh.GetRootBodyInstance().PreviousVeloci ty) * GetCollisionDamageModifier(RigidCollisionData.Cont actInfos) > 5) )
{
super.RigidBodyCollision(HitComponent, OtherComponent, RigidCollisionData, ContactIndex);
}
}
simulated function CauseMuzzleFlashLight(int SeatIndex)
{
Super.CauseMuzzleFlashLight(SeatIndex);
//@FIXME: should have general code for this in UTVehicle
if (SeatIndex == 0)
{
VehicleEvent('MuzzleFlash');
}
}
/**
* We override here as the scorpion uttlery destroys itself when it blows up! So we need to turn off the damage effects as they
* are out of place just floating in the air.
**/
simulated function SetBurnOut()
{
Super.SetBurnOut();
if( DeathExplosion != none )
{
DeathExplosion.ParticleSystemComponent.DeactivateS ystem();
}
VehicleEvent( 'NoDamageSmoke' );
}
function bool IsGoodTowTruck()
{
return true;
}
function bool RecommendCharge(UTBot B, Pawn Enemy)
{
local UTVehicle V;
if ( Enemy.bCanFly )
{
return false;
}
V = UTVehicle(Enemy);
return (V == None) || V.ImportantVehicle() || (V.Health > 300);
}
/** Recommend high priority charge at enemy */
function bool CriticalChargeAttack(UTBot B)
{
return (UTVehicle(B.Enemy) != None) && RecommendCharge(B, B.Enemy);
}
defaultproperties
{
Health=1000
StolenAnnouncementIndex=5
COMOffset=(x=-20.0,y=0.0,z=-36.0)
UprightLiftStrength=280.0
UprightTime=1.25
UprightTorqueStrength=500.0
bCanFlip=true
bSeparateTurretFocus=true
bHasHandbrake=true
bStickDeflectionThrottle=true
GroundSpeed=950
AirSpeed=1100
RocketSpeed=2000
ObjectiveGetOutDist=1500.0
MaxDesireability=0.4
HeavySuspensionShiftPercent=0.75f;
bLookSteerOnNormalControls=true
bLookSteerOnSimpleControls=true
LookSteerSensitivity=2.2
LookSteerDamping=0.07
ConsoleSteerScale=1.1
DeflectionReverseThresh=-0.3
Begin Object Class=UDKVehicleSimCar Name=SimObject
WheelSuspensionStiffness=30.0
WheelSuspensionDamping=3.0
WheelSuspensionBias=-2.0
ChassisTorqueScale=0.0
MaxBrakeTorque=5.0
StopThreshold=100
MaxSteerAngleCurve=(Points=((InVal=0,OutVal=45),(I nVal=600.0,OutVal=15.0),(InVal=1100.0,OutVal=10.0) ,(InVal=1300.0,OutVal=6.0),(InVal=1600.0,OutVal=1. 0)))
SteerSpeed=110
LSDFactor=0.0
TorqueVSpeedCurve=(Points=((InVal=-600.0,OutVal=0.0),(InVal=-300.0,OutVal=80.0),(InVal=0.0,OutVal=130.0),(InVal =950.0,OutVal=130.0),(InVal=1050.0,OutVal=10.0),(I nVal=1150.0,OutVal=0.0)))
EngineRPMCurve=(Points=((InVal=-500.0,OutVal=2500.0),(InVal=0.0,OutVal=500.0),(InV al=549.0,OutVal=3500.0),(InVal=550.0,OutVal=1000.0 ),(InVal=849.0,OutVal=4500.0),(InVal=850.0,OutVal= 1500.0),(InVal=1100.0,OutVal=5000.0)))
EngineBrakeFactor=0.025
ThrottleSpeed=0.2
WheelInertia=0.2
NumWheelsForFullSteering=4
SteeringReductionFactor=0.0
SteeringReductionMinSpeed=1100.0
SteeringReductionSpeed=1400.0
bAutoHandbrake=true
bClampedFrictionModel=true
FrontalCollisionGripFactor=0.18
ConsoleHardTurnGripFactor=1.0
HardTurnMotorTorque=0.7
SpeedBasedTurnDamping=20.0
AirControlTurnTorque=40.0
InAirUprightMaxTorque=15.0
InAirUprightTorqueFactor=-30.0
// Longitudinal tire model based on 10% slip ratio peak
WheelLongExtremumSlip=0.1
WheelLongExtremumValue=1.0
WheelLongAsymptoteSlip=2.0
WheelLongAsymptoteValue=0.6
// Lateral tire model based on slip angle (radians)
WheelLatExtremumSlip=0.35 // 20 degrees
WheelLatExtremumValue=0.9
WheelLatAsymptoteSlip=1.4 // 80 degrees
WheelLatAsymptoteValue=0.9
bAutoDrive=false
AutoDriveSteer=0.3
End Object
SimObj=SimObject
Components.Add(SimObject)
Begin Object Class=Vehicle_Sophia_Wheel Name=RRWheel
BoneName="BR_Tire"
BoneOffset=(X=0.0,Y=20.0,Z=0.0)
SkelControlName="BR_Control"
End Object
Wheels(0)=RRWheel
Begin Object Class=Vehicle_Sophia_Wheel Name=LRWheel
BoneName="BL_Tire"
BoneOffset=(X=0.0,Y=-20.0,Z=0.0)
SkelControlName="BL_Control"
End Object
Wheels(1)=LRWheel
Begin Object Class=Vehicle_Sophia_Wheel Name=RFWheel
BoneName="FR_Tire"
BoneOffset=(X=0.0,Y=20.0,Z=0.0)
SteerFactor=1.0
LongSlipFactor=2.0
LatSlipFactor=3.0
HandbrakeLongSlipFactor=0.8
HandbrakeLatSlipFactor=0.8
SkelControlName="FR_Control"
End Object
Wheels(2)=RFWheel
Begin Object Class=Vehicle_Sophia_Wheel Name=LFWheel
BoneName="FL_Tire"
BoneOffset=(X=0.0,Y=-20.0,Z=0.0)
SteerFactor=1.0
LongSlipFactor=2.0
LatSlipFactor=3.0
HandbrakeLongSlipFactor=0.8
HandbrakeLatSlipFactor=0.8
SkelControlName="FL_Control"
End Object
Wheels(3)=LFWheel
lockSuspensionTravel=37;
lockSuspensionStiffness=62.5;
TeamBeaconOffset=(z=60.0)
SpawnRadius=125.0
BaseEyeheight=30
Eyeheight=30
DefaultFOV=80
bLightArmor=true
CameraLag=0.07
bReducedFallingCollisionDamage=true
SelfDestructSpeedSquared=810000.0
MomentumMult=0.5
NonPreferredVehiclePathMultiplier=1.5
HornIndex=0
}
Vehicle_Sophia_Wheel.uc
/**
* Copyright 1998-2009 Epic Games, Inc. All Rights Reserved.
*/
class Vehicle_Sophia_Wheel extends UDKVehicleWheel;
defaultproperties
{
WheelRadius=27
SuspensionTravel=20
bPoweredWheel=true
SteerFactor=0.0
LongSlipFactor=2.0
LatSlipFactor=2.75
HandbrakeLongSlipFactor=0.7
HandbrakeLatSlipFactor=0.3
ParkedSlipFactor=10.0
bUseMaterialSpecificEffects=true
}
These four are the ones i use at the moment in UDK Feb version, they compile without errors or warnings and vehicle doesn't crash so far at all. I also cleaned all the scorpion's booster code i could.
Spoondog
02-14-2010, 12:48 AM
Prophet - very helpful thx! :)
kaktuzoid
02-19-2010, 03:44 AM
Thank you guys for your help in scripting.
I am surprised that the Epic has not yet been createded simple step-by-step howto on such basic issue as vehicle.
Setting up a simple car turns into a real pain in *.
I'm not talking about something more complex, such as a tank.
For example in crysis engine tuning any vehicle (helicopter, tank, car with any number of wheels) takes about an hour.
Just open existing, replace mesh + some fine tuning the settings.
I do not call to copy everything from the crysis, but if epic are interested in
creating diverse games, it would not be bad to take some steps in this direction.
As an option - create all the basic classes of vehicles - 4wheel car, tank, helicopter, hovercraft. Include all the necessary basic scripts and remove from them all superfluous.
D-Rez
02-23-2010, 02:51 PM
I am surprised that the Epic has not yet been createded simple step-by-step howto on such basic issue as vehicle.
Setting up a simple car turns into a real pain in *.
Agreed. I've wasted almost a month on trying to figure out how to get a single working vehicle in-game. The guys on the forum have really helped (particularly those in this thread) but so many of these problems could have been addressed much quicker with some official documentation and tutorials. Other topics are covered in so much depth I wonder why essential info on this subject hasn't been provided - maybe because it is such a pain to do?
On the topic of vehicles being a real pain, does anyone have any idea why this is happening to my custom vehicle? The front rises off the ground upon spawning and it just stays there, making the vehicle completely useless.
http://img.photobucket.com/albums/v434/zonefox/UDK%20Forum%20Images/udk_car_problem.jpg
I've spent a whole day looking at the wheel script, the various vehicle scripts, the animTree, the physicsAsset, the original rig and even the model itself in Maya, to no avail.
I have no idea what is causing this and no matter what values I adjust in the script, it continues to do this. What is even more frustrating is that a month ago I made a basic dummy vehicle based on Dance's Humvee and it worked perfectly, so I have managed to get a car to work in game - just not the car I need.
-Rez
geodav
02-23-2010, 03:29 PM
check your bone alignments
crapageddon
02-23-2010, 03:32 PM
Are you using the Feb udk? It's funny I was JUST about to post the exact same problem with my vehicle. Check the WheelSuspensionBias (in UTVehicle**nameOfVehicle**.uc). Also check the COMOffset in Default Properties of the same file.
@ EVERYONE
Also I ported over to the Feb UDK and went through line by line all the "sophia" codes posted here earlier on the thread by ProphetMan and it has fixed ALL of my crashing problems. I'm pretty sure the crashing on exit was linked to this area:
/** If exit while boosting, boost out of the vehicle
Try to exit above
*/
function bool FindAutoExit(Pawn ExitingDriver)
{
local vector X,Y,Z;
local float PlaceDist;
return Super.FindAutoExit(ExitingDriver);
}
Most of these lines were giving me errors and in the new build I see that Prophet removed them entirely. Now I build with a nice big Green 0 ERRORS at the bottom of my compile.
Now that the crash is fixed, moving onto stripping out all remaining references to the scorpion. Trying to build a much more user-friendly base class car vehicle to work off of as a template. Thanks to everyone for the help so far!!!!
D-Rez
02-23-2010, 04:41 PM
GeoDav, just checked the bone alignments and they seem fine. all bones are facing the same way, and the rig seems okay.
Crapageddon, I checked the script files too and they're all back to default values. It seems that this problem is persistent no matter what values I change. I'm using the January Beta at the mo because i'm tired of having to move over all the mod files every month, but as i'm not getting anywhere with it I think i'll probably switch to the Feb release.
One thing to note is that I scaled down the vehicle after finding it was way too big in game (would have been approx. 12 feet tall) but I didn't scale the rig - I made a new one from scratch in Maya. Also, I tweaked the UT*customvehiclenamehere*Wheel.uc file and that's when things started to go horribly wrong - even after restoring default values I get the same result.
The older, 'too-big' version of the car seems to work okay but the proportionate version does not.
Still a bit short of ideas at this end.
-Rez
UnWheelModeller
02-23-2010, 06:21 PM
When I designed my vehicles, I deliberately named my bones with the naming conventions of the Scorpion. It is possible to copy and paste the AnimTree from one vehicle to another vehicle, if you use the correct names. Once I had made my first custom AnimTree, I duplicated it for the others.
geodav
02-24-2010, 01:53 PM
@D-Res you might have to redo the whole animtree, animset, physics asset, i know its a pain but if the big one worked the the problem is that it won't fit with the smaller one.
tegleg
02-25-2010, 10:15 AM
nice work you guys
but, i have been trying for a few days to get any of these vehicles to work
the closest i came was with the humvee, it actaly appeared on the map but it crashed when i tried to launch.
the sophia code i cant get to work at all.
the reason for this is clearly because i dont know what im doing.
so, what would really help me, and possibly many others, is if one of you could share the actual files you got working, as well as the model in 3ds or whatever.
then i could have a look at a working vehicle and work out whats going on.
thanks
D-Rez
02-25-2010, 11:03 AM
@D-Res you might have to redo the whole animtree, animset, physics asset, i know its a pain but if the big one worked the the problem is that it won't fit with the smaller one.
Good point - the animTree, physics asset etc don't take that long to re-do so i'll give it a go. Thanks for that :)
Also, I know this is already posted in this thread but if anyone is looking for AnimTree / Physics Model / Sockets tutorials, check out the last half of this page, it's been pretty informative for me:
http://code.google.com/p/steam-punk-pirates-mod/wiki/CustomWheeledVehiclesTutorial
-Rez
tegleg
02-25-2010, 01:22 PM
i hacked away at the scorpion code until all the blade stuff and errors had gone
then i canged the mesh to VH_Humvee and deleted scorpion the anim sets.
now im struggling with names of bones, and i still want to use the turret.
when i fire it still makes the sound but no projectile, im guessing it because there is no turret in the model.
i use 3ds max, is there a relavent vehicle/bones tutorial out there?
ahh i assume this is it
http://www.fileplanet.com/208564/200000/fileinfo/01_UT3_CWV_rig_skin_xvid
D-Rez
02-25-2010, 02:32 PM
i hacked away at the scorpion code until all the blade stuff and errors had gone
then i canged the mesh to VH_Humvee and deleted scorpion the anim sets.
now im struggling with names of bones, and i still want to use the turret.
when i fire it still makes the sound but no projectile, im guessing it because there is no turret in the model.
i use 3ds max, is there a relavent vehicle/bones tutorial out there?
The sound effects are called in one of the Scorpion/Humvee's .uc files if I recall correctly - maybe disabling the relevant code will stop the sound effect. I'm not sure which .uc file it will be in - UT*vehiclename*_Content.uc, perhaps?
As for the bone naming conventions, I use these and have had no issues:
BODY:
Main_Root (body/root bone where EVERYTHING should be parented to in the rig)
WHEELS:
F_R_Tire
F_L_Tire
B_R_Tire
B_L_Tire
(That's Front Right Tire, Front Left Tire, Back Right Tire... etc)
AXLE/SUSPENSION:
F_R_Axle
F_L_Axle
B_R_Axle
B_L_Axle
(As before, Front Right Axle, etc)
Hope that's of some use - as for a turret, that's back to sockets in the UDK editor - check my last post in this thread for a link to a wheeled vehicle tutorial that talks a little bit about them (and has a bone name for a turret on their custom vehicle too).
-Rez
tegleg
02-25-2010, 02:34 PM
oh no it isnt bah...
thanks d-rez, but how do i make a vehicle in 3ds?
geodav
02-25-2010, 02:41 PM
yep that the tutorial ;)
when i fire it still makes the sound but no projectile, im guessing it because there is no turret in the model.
maybe don't forget you need a vehicleweapon class which is called in you "seat"
Seats(0)={( GunClass=class'UTVWeap_ScorpionTurret',
GunSocket=(TurretFireSocket),
GunPivotPoints=(gun_rotate),
TurretVarPrefix="",
TurretControls=(TurretRotate),
SeatIconPos=(X= 0.415,Y=0.5),
CameraTag=GunViewSocket,
CameraBaseOffset=(X=-50.0),
CameraOffset=-175,
WeaponEffects=((SocketName=TurretFireSocket,Offset =(X=-14,Y=5),Scale3D=(X=2.0,Y=3.0,Z=3.0)),(SocketName=T urretFireSocket,Offset=(X=-14,Y=-5),Scale3D=(X=2.0,Y=3.0,Z=3.0)))
)}
for those who are interesred i've included the code for my mod/game build in the latest upload found at http://www.moddb.com/mods/ut40k-the-chosen
please remember my wheeled vehicles are bikes with the code from the UT3 hellbender, please wait a few days for the upload to finish
tegleg
02-25-2010, 02:58 PM
thanks, i was looking for the weapon bit
i just watched your tutorial, its very good,
but i dont know how you set up the objects and bones in the first place
i have never had to use bones before so i no nothing about it
i have been searching for tutorials but a udk vehicle requires a specific setup and i just cant find one relavent
tegleg
02-26-2010, 11:13 AM
ok then, so im using the humvee model as a base in 3dmax, then replacing the mesh with my own. until i find a tutorial i will have to do it like this.
i managed to get a car working and with custom weapons, i had to put a TurretFireSocket, i didnt bother with gun_rotate.
so i made another one today.
but the wheels dont animate at all. i have been over and over everything looking for the problem and i cant see any difference between the working car and this one. im stuck.:confused:
What do you suspect is the most likely cause?
edit: i have narrowed it down to something wrong with the model
geodav
02-26-2010, 02:25 PM
i don't use bones i use max objects like a simple pyramid which i rotate to point down the x-axis and then align the objects pivot to the world. i show this in some of my other videos maybe the UT3 weapon and the hovercraft, i didn't want to keep on repeating my self
your problem maybe the wheels are not skinned to the bones or your animtree isn#t correct
tegleg
02-26-2010, 03:01 PM
thanks ill check out those vids
lol you sound just like a guy i know in leeds
orcgod
02-27-2010, 12:07 PM
hi guys, im a nooby in unreal, im a 3d modeler/animator and i would like to create a game. ive been reading this thread for awhile and its very informative, you guys rock! soon, i could post my update here, and hopefully you guys could guide me each step, thanks.
right now, im coloring my concept character for the game. its 70% done, ill try to post it here if thats ok with you guys. I wanna start from character concept, to environment, then export everything in unreal.
here's a 3D reel i made last 2009 - http://vimeo.com/9270449
hope i could be able to put these types of characters in a game :)
hello my name is nish,
i am trying to modify the "cicada" aircraft in ut3 so i can use scripts for a flying ship that i have designed.
Now like allot of people here im not a coder and i really need some help if any one can give me any advice, help or tutorials on understanding/modifying the cicada script, it would be most appreciated.
thank you for your time
nish
geodav
02-28-2010, 02:01 PM
if your working with UDK then use the UDK code and not the UT3.
it's the same as any other vehicle use change the bits you need.
ps in my latest build i've included all the code i use
hello geodav
yepp sorry i ment i am using udk engine but i still call it ut3 :(
but yepp udk script udk cicada
i dont understand scipt that much i dont understand what scipts make it do certain things or what bones <maya> are need to make it fly if its based on the cicada.
nish
ps may i have a link pretty please :)
geodav
02-28-2010, 03:09 PM
here's the link to my mod/game http://www.moddb.com/mods/ut40k-the-chosen/downloads/ut40k-build-march-2010
the files your looking for will the typhoon
tegleg
02-28-2010, 07:31 PM
sorry, i just cant get it working and its frazzling my brain.
it might be the heirarchy that im not doing right maybe?
heres how i understand it:
starting from new in 3ds max.
make a shape for your chassis
you link any other bits like wings or whatever to the chassis using select and link, select a bit (making it child) and drag to the chassis (parent) or maybe not?
you dont link the wheels or susspension bits (or you do?)
you make Main_Root bone
you make all the other bones (fl_tire, axle ...)and link them all to the main_root, in the same way as described above?
select chassis, add modifier, skin. add main_root bone
then you skin the wheels and susspention with their appropriate bones in the same way
then export actorX
i have no idea about materials at all, uvUnwrap? uvmap? add uvmap? dno
please could you tell me what im doing wrong or missing
thanks
geodav
03-01-2010, 02:45 PM
make a shape for your chassis
you link any other bits like wings or whatever to the chassis using select and link, select a bit (making it child) and drag to the chassis (parent) or maybe not?
you dont link the wheels or susspension bits (or you do?)
answer "NO" you make it into a single mesh by attaching (not linking) all the model parts together then you do the uvw map (must) apply a texture.
now you can make your rig and skin it
tegleg
03-01-2010, 07:10 PM
i finaly managed it yay!
geodav you are ace
thank you :D
Sir. Polaris
03-01-2010, 07:40 PM
All hail GeoDav!
tegleg
03-02-2010, 11:58 AM
i have uploaded my vehicle for anyone that wants it here:
http://rapidshare.com/files/357931717/VH_BubbleCar.zip
please feel free to spread it around cos i dont know how long this link will work.
its the scorpion code with the blade stuff removed, with bits tweaked here and there.
it also has a slightly modified Cicada rocket so i have put that in there as well.
EDIT2: sorry i just noticed it doesnt use the moded rocket, so you dont have to bother with that bit.
also the model i made in .max format.
Have fun!
http://c3.ac-images.myspacecdn.com/images02/126/l_4064597d540b4cf78583d95568ce3cbe.jpg
i don't use bones i use max objects like a simple pyramid which i rotate to point down the x-axis and then align the objects pivot to the world. i show this in some of my other videos maybe the UT3 weapon and the hovercraft, i didn't want to keep on repeating my self
your problem maybe the wheels are not skinned to the bones or your animtree isn#t correct
Thanks dude I've been struggling with getting those bones right in 3ds max (i didnt know we could use other objects!). Got the Humvee code and my basic box car working...(i dont care about the crashing on exit for now)...
next step would be a fix cam(no rotation with mouse)...any idea on where i should start?
tegleg
03-02-2010, 07:08 PM
yo the crashing on exit might be the 'Exit Radius'
i saw it somewhere in the code
geodav
03-03-2010, 02:20 PM
@Dn2 sorry mate i'm just a copy/paste coder not sure what you need could be mouse steer !!! like the manta
Kaneth
03-03-2010, 11:55 PM
Im currently working on a vehicle for UDK based on your tutorials GeoDav
Its mostly a case of modifying the code a bit for UDK.
@Dn2 sorry mate i'm just a copy/paste coder not sure what you need could be mouse steer !!! like the manta
well i kinda want to disable any camera movement with the mouse at all...searching all over but nothing solid so far..
im also not a coder...so i just search through the code lookin for something that seem like it would effect camera control..
i think i saw something somewhere that lead me to believe that there is something in the pawn class that, gives the vehicle (or transfers ) control of the camera when entering the vehicle. since i cant seem to find out how to get a fixed cam on the car, maybe i could disable the "mouse look" and the "switch to vehicle camera" at the pawn lvl...>_>"
anyway am babbling on something i really dont know anything about...but the mouse steer mite have something...
to the manta!!!
what do u all think about enabling "LookSteer" and just maxing out the "deadzone" so mouse movements dont affect steering?
geodav
03-04-2010, 01:45 PM
thats the one "LookSteer" for steering with the mouse, ahh you don't want the mouse to do any thing umm not sure there, sorry
ah no worries...ur tuts have been a great help otherwise...ill focus on other aspects while i try to figure this one out...
here's the link to my mod/game http://www.moddb.com/mods/ut40k-the-chosen/downloads/ut40k-build-march-2010
the files your looking for "will the typhoon"
area in qoutation maarks whatca mean by this mr geodav?
tegleg
03-05-2010, 10:59 AM
i have been experimenting a bit with the code of VH_BubbleCar. it was sitting a little low so i changed this:
UTVehicle_Bubblecar
WheelSuspensionStiffness=360.0
im wondering if there is another value that changes the ride height of the vehicle body? it would be nice to have soft suspension with long travel. i tried messing with UprightLiftStrength but it doesnt seem to do anything. ideas?
the next problem i encountered was the bots not using the vehicle. so i had a look through the Cicada code because they always get in those. it turns out if you delete this line they get in no problem:
MaxDesireability=0.4
i changed this line as well, now it wheelies a bit, great fun to drive.
TorqueVSpeedCurve=(Points=((InVal=-500.0,OutVal=0.0),(InVal=-200.0,OutVal=80.0),(InVal=0.0,OutVal=130.0),(InVal =750.0,OutVal=130.0),(InVal=850.0,OutVal=10.0),(In Val=950.0,OutVal=0.0)))
a question for people making racing games (or anyone else)
how do you get the bots to drive round the course?
btw. i didnt manage to find ExitRadius or anything like again sorry, maybe i imagined it
geodav
03-05-2010, 02:20 PM
@tegleg
im wondering if there is another value that changes the ride height of the vehicle body? it would be nice to have soft suspension with long travel. i tried messing with UprightLiftStrength but it doesnt seem to do anything. ideas?
when you export your vehicle you need to move the wheels to the lowest extent of the suspension travel, if you move them more down this will get you more travel.
@nish, sorry that should read
the files your looking for will be the "typhoon"
the typhoon files are my flyer code eg:- UTVehicle_SMUMTyphoon
D-Rez
03-05-2010, 03:58 PM
Hey guys,
I'm having a problem with my custom vehicle 'rearing up' at the moment when spawning and accelerating, like it's pulling a wheelie. It drops onto four wheels in reverse but otherwise only the rear wheels are on the ground. I've tried adjusting the position of the bones and re-exporting the vehicle as well as adjusting the WheelSuspensionBias in the UTVehicle(custom vehicle).uc but it's still happening.
The body of the vehicle is still leaning toward the rear, as if there's a heavy weight on the back of the car. Did anyone else sort this problem out? I know i'm not the only one who's experienced this.
EDIT: PROBLEM SOLVED
I think i've figured it out thanks to looking on here and 3Dbuzz - The root bone position affects the weight balance of the vehicle. In my case, I moved it much further forward and now the vehicle handling seems to be back to normal (the same as the scorpion with suspension and minimal collision issues) - see my screenshot for an explaination:
http://img.photobucket.com/albums/v434/zonefox/UDK%20Forum%20Images/vehicle_balance_solved.jpg
* * *
Also, on a seperate note, you need to make sure no vehicle scripts have 'native' classes in them - having this in the .uc files will crash the game on startup (or at least it did for me)
-Rez
bera90
03-06-2010, 06:52 AM
has anyone Tank simple example?(mesh with scripts)
tegleg
03-06-2010, 12:20 PM
yes please a tank would be good
i cant work out whats wrong here
i made another car
i imported the sk mesh into udk
copied the script from bubblecar and renamed the class and the skelital mesh
created new physics, animset and animtree using the new car as preview mesh
in the editor the car appears normal
when i run the game it uses the bubblecar mesh?
i have checked the script and it all seems fine
D-Rez
03-06-2010, 12:36 PM
yes please a tank would be good
i cant work out whats wrong here
i made another car
i imported the sk mesh into udk
copied the script from bubblecar and renamed the class and the skelital mesh
created new physics, animset and animtree using the new car as preview mesh
in the editor the car appears normal
when i run the game it uses the bubblecar mesh?
i have checked the script and it all seems fine
Have you deleted the UTGame.ini file from *your UDK directory*\UTGame\Config before running the editor/game? If you have general game mod files set up, not deleting this before starting up UDK can sometimes be an issue.
Alternatively, have you set up a new vehicle factory to spawn the new car with all the correct naming conventions linking to the new car's package?
Just a couple of thoughts, don't know if they're any use to you :)
-Rez
tegleg
03-06-2010, 01:10 PM
Have you deleted the UTGame.ini file from *your UDK directory*\UTGame\Config before running the editor/game? If you have general game mod files set up, not deleting this before starting up UDK can sometimes be an issue.
-Rez
yes that was it thanks
i also had to do a full recompile on the frontend
tegleg
03-10-2010, 05:20 PM
C:\UDK\UDK-2010-03\Development\Src\Tegleg\Classes\UTVehicle_Baja.u c(1020) : Error, Unrecognized member 'FindPathToObjective' in class 'UDKSquadAI'
Compile aborted due to errors.
its something to do with http://utforums.epicgames.com/showthread.php?t=720640
in UTVehicle_Scorpion they changed
return B.Squad.FindPathToObjective(B, O);
to
return UTSquadAI(B.Squad).FindPathToObjective(B, O);
hmm
now i just have to work out why its invisible
EDIT: it was invisible cos the material had dissapeared in the move to march udk
JohNLA
03-16-2010, 07:06 PM
First a big thanks to the Geodav tutorials for getting me this far.
http://john-brock.com/adams/hovcad_broke.jpg
Anyone recognize this error?
I sits at an angle in game.
It looks fine in the editors.
This is an improvement.
Originally, it was a full 90 degrees rotated.
I went back to 3DS and rotated my bones 90 degrees and re-skinned. Now it is drivable but that slight angle is bugging me.
I re-checked the bone rotations and they all look correct so I am not sure what to mess with next.
Also, does anyone know how to get the driver to stand instead of sit?
JohNLA
03-17-2010, 03:19 AM
It also crashes my game if I run outside the editor:mad:
My guess is that it is probably a stupid effects bone. I will try eliminating them tomorrow and see if that helps.
where do i find thiose files geodav? all i can find is the install file for your game
JohNLA
03-17-2010, 01:10 PM
where do i find thiose files geodav? all i can find is the install file for your game
http://sites.google.com/site/ut40kmod/UT40k_mod/ut3-video-tutorials
crapageddon
03-17-2010, 02:05 PM
I'm guessing your rotation could be an adjustment to the COB (center of balance). My car which had no shocks was heavily influenced by that. Adjusting it fixed my car being front/back heavy. Yours being to the side makes me think it could be this or a variation of this. The code might be reading your left/right as front/back if it's not aligned on the same axis as the script is. Just an idea. Let me know if it helps.
geodav
03-17-2010, 03:34 PM
@JohNLA, even after you rotated the bones you must aline the pivot to the world, if it crashes the game then check your launch.log, you might have forgotten to remove the "native" calls from the code files.
@nish you need to install my game to get the files, or just use the cicada files and rename them like i do in the other videos
JohNLA
03-17-2010, 06:30 PM
Thanks crapageddon and geodav.:)
I will look into all the suggestions and post what I find.
JohNLA
03-17-2010, 08:49 PM
@JohNLA, even after you rotated the bones you must aline the pivot to the world, if it crashes the game then check your launch.log, you might have forgotten to remove the "native" calls from the code files.
You are good.
I checked the log (I feel stupid for having to be told about the log but hey I am an artist;)) Anyways looks like you were right on in your diagnosis.
Log: === Critical error: ===
Can't bind to native class E_Hov.UTVehicle_Hovcad
The problem is when I remove the native line as you point out in your video. I get an error on script recompile: Error, Cannot use cpptext blocks in non-native classes
That is why I originally put that line back in so it would compile. I assumed something changed between UT3 and UDK.:o
I am not sure what I could be doing wrong. I tried deleting the native line and I get the cpptext error. I tried commenting it out by doing:
/**
* Copyright 1998-2010 Epic Games, Inc. All Rights Reserved.
*/
class UTVehicle_Hovcad extends UTHoverVehicle
/**
native(Vehicle)
*/
abstract;
I tried removing the abstract line as well but nothing works.
I do not think it matters but my version of the ConText editor does not have direct support for Unreal script like the version in Geodav's videos.
geodav
03-18-2010, 04:07 PM
@JohNLA you need to remove the "native" and the cpptext blocks, we UDK users can't use the native functions thats just for licenseies
when using the ConText editor you need the unrealscript "highlighter" which is available from the context website, sorry if i didn't mention that in my UDK videos
JohNLA
03-18-2010, 07:13 PM
Thanks again, I owe you several pints. I got the highlighter.
Sorry, to be such a noob but despite several searches I can not figure out what cpptext blocks are.
My script looks just like yours in the video but it wont compile.
/**
* Copyright 1998-2010 Epic Games, Inc. All Rights Reserved.
*/
class UTVehicle_Hovcad extends UTHoverVehicle
abstract;
var(Movement) float JumpForceMag;
geodav
03-19-2010, 02:42 PM
ah, i just checked my UT40k code and my jetbike extrends of the UTVehicle_Manta, i'll need to check the complete code from the base vehcile to see how it works with UDK. here my current code which does work without any log errors.
/**
* Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
*/
class UTVehicle_CWEJetbike_Content extends UTVehicle_Manta;
/*
simulated function InitializeEffects()
{
Super.InitializeEffects();
// we need to do this here as we have a bunch of code that correctly spawns on demand but these are a special case
// of needing to exist when ever there is a manta
if( VehicleEffects[FanEffectIndex].EffectRef == None )
{
CreateVehicleEffect( FanEffectIndex );
}
// immediately start and stop the fan effect, causing the blade particle to be left there unmoving so it's not missing
//@note: requires a nonzero WarmupTime in the particle system itself
if (FanEffectIndex >= 0 && FanEffectIndex < VehicleEffects.Length && VehicleEffects[FanEffectIndex].EffectRef != None)
{
VehicleEffects[FanEffectIndex].EffectRef.ActivateSystem();
VehicleEffects[FanEffectIndex].EffectRef.DeactivateSystem();
}
}
*/
simulated event MantaJumpEffect()
{
PlaySound(JumpSound, true);
VehicleEvent('BoostStart');
}
simulated event MantaDuckEffect()
{
if (bHoldingDuck)
{
PlaySound(DuckSound, true);
VehicleEvent('CrushStart');
}
else
{
VehicleEvent('CrushStop');
}
}
simulated function SetVehicleEffectParms(name TriggerName, ParticleSystemComponent PSC)
{
if (TriggerName == 'MantaOnFire')
{
PSC.SetFloatParameter('smokeamount', 0.95);
PSC.SetFloatParameter('fireamount', 0.95);
}
else
{
Super.SetVehicleEffectParms(TriggerName, PSC);
}
}
simulated event TakeDamage(int Damage, Controller EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser)
{
// manta is fragile so it takes momentum even from weapons that don't usually impart it
if ( (DamageType == class'UTDmgType_LinkPlasma') && !IsZero(HitLocation) )
{
Momentum = (Location - HitLocation) * float(Damage) * 20.0;
}
Super.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);
}
function bool Died(Controller Killer, class<DamageType> DamageType, vector HitLocation)
{
VehicleEvent('MantaNormal');
return Super.Died(Killer,DamageType,HitLocation);
}
simulated function DrivingStatusChanged()
{
if ( !bDriving )
{
VehicleEvent('CrushStop');
}
Super.DrivingStatusChanged();
}
simulated function BlowupVehicle()
{
if(WorldInfo.Netmode != NM_DEDICATEDSERVER && VehicleEffects[11].EffectRef != none)
{
VehicleEffects[11].EffectRef.SetHidden(true); // special case to get rid of the blades
}
super.BlowUpVehicle();
}
defaultproperties
{
Begin Object Name=CollisionCylinder
CollisionHeight=40.0
CollisionRadius=100.0
Translation=(X=-40.0,Y=0.0,Z=40.0)
End Object
Begin Object Name=SVehicleMesh
SkeletalMesh=SkeletalMesh'VH_CWE_Jetbike.Mesh.cwje tbike'
AnimTreeTemplate=AnimTree'VH_CWE_Jetbike.Anims.cwj etbike_AnimTree'
PhysicsAsset=PhysicsAsset'VH_CWE_Jetbike.Mesh.cwje tbike_Physics'
MorphSets[0]=MorphTargetSet'VH_CWE_Jetbike.Mesh.cwjetbike_Morp hTargetSet'
Scale=0.65
End Object
Seats(0)={( GunClass=class'UTVWeap_JetbikeGun',
GunSocket=(Gun_Socket_01,Gun_Socket_02),
TurretControls=(gun_rotate_lt,gun_rotate_rt),
CameraTag=ViewSocket,
CameraOffset=-180,
SeatIconPos=(X=0.46,Y=0.45),
DriverDamageMult=0.75,
bSeatVisible=true,
CameraBaseOffset=(X=-20,Y=0,Z=10),
SeatOffset=(X=0,Y=0,Z=0),
WeaponEffects=((SocketName=Gun_Socket_01,Offset=(X =-35,Y=-3),Scale3D=(X=3.0,Y=6.0,Z=6.0)),(SocketName=Gun_So cket_02,Offset=(X=-35,Y=-3),Scale3D=(X=3.0,Y=6.0,Z=6.0)))
)}
// Sounds
// Engine sound.
Begin Object Class=AudioComponent Name=MantaEngineSound
SoundCue=SoundCue'A_Vehicle_Manta.SoundCues.A_Vehi cle_Manta_EngineLoop'
End Object
EngineSound=MantaEngineSound
Components.Add(MantaEngineSound);
CollisionSound=SoundCue'A_Vehicle_Manta.SoundCues. A_Vehicle_Manta_Collide'
EnterVehicleSound=SoundCue'A_Vehicle_Manta.SoundCu es.A_Vehicle_Manta_Start'
ExitVehicleSound=SoundCue'A_Vehicle_Manta.SoundCue s.A_Vehicle_Manta_Stop'
// Scrape sound.
Begin Object Class=AudioComponent Name=BaseScrapeSound
SoundCue=SoundCue'A_Gameplay.A_Gameplay_Onslaught_ MetalScrape01Cue'
End Object
ScrapeSound=BaseScrapeSound
Components.Add(BaseScrapeSound);
JumpSound=SoundCue'A_Vehicle_Manta.Sounds.A_Vehicl e_Manta_JumpCue'
DuckSound=SoundCue'A_Vehicle_Manta.Sounds.A_Vehicl e_Manta_CrouchCue'
// Initialize sound parameters.
EngineStartOffsetSecs=0.5
EngineStopOffsetSecs=1.0
VehicleEffects(0)=(EffectStartTag=EngineStart,Effe ctEndTag=EngineStop,EffectTemplate=ParticleSystem' VH_CWE_Jetbike.Effects.P_VH_JetbikeExhaust',Effect Socket=Tailpipe_1)
VehicleEffects(1)=(EffectStartTag=EngineStart,Effe ctEndTag=EngineStop,EffectTemplate=ParticleSystem' VH_CWE_Jetbike.Effects.P_VH_JetbikeExhaust',Effect Socket=Tailpipe_2)
// VehicleEffects(2)=(EffectStartTag=BoostStart,Effec tEndTag=BoostStop,EffectTemplate=ParticleSystem'VH _Manta.EffectS.PS_Manta_Up_Boost_Jump',EffectSocke t=Wing_Lft_Socket)
// VehicleEffects(3)=(EffectStartTag=BoostStart,Effec tEndTag=BoostStop,EffectTemplate=ParticleSystem'VH _Manta.EffectS.PS_Manta_Up_Boost_Jump',EffectSocke t=Wing_Rt_Socket)
// VehicleEffects(4)=(EffectStartTag=CrushStart,Effec tEndTag=CrushStop,EffectTemplate=ParticleSystem'VH _Manta.Effects.PS_Manta_Down_Boost',EffectSocket=W ing_Lft_Socket)
// VehicleEffects(5)=(EffectStartTag=CrushStart,Effec tEndTag=CrushStop,EffectTemplate=ParticleSystem'VH _Manta.Effects.PS_Manta_Down_Boost',EffectSocket=W ing_Rt_Socket)
VehicleEffects(6)=(EffectStartTag=MantaWeapon01,Ef fectTemplate=ParticleSystem'VH_Manta.Effects.PS_Ma nta_Gun_MuzzleFlash',EffectSocket=Gun_Socket_02)
VehicleEffects(7)=(EffectStartTag=MantaWeapon02,Ef fectTemplate=ParticleSystem'VH_Manta.Effects.PS_Ma nta_Gun_MuzzleFlash',EffectSocket=Gun_Socket_01)
// VehicleEffects(8)=(EffectTemplate=ParticleSystem'V H_Manta.Effects.PS_Manta_Up_Boost',EffectSocket=Wi ng_Lft_Socket)
// VehicleEffects(9)=(EffectTemplate=ParticleSystem'V H_Manta.Effects.PS_Manta_Up_Boost',EffectSocket=Wi ng_Rt_Socket)
VehicleEffects(10)=(EffectStartTag=DamageSmoke,Eff ectEndTag=NoDamageSmoke,bRestartRunning=false,Effe ctTemplate=ParticleSystem'Envy_Effects.Vehicle_Dam age.P_Vehicle_Damage_1_Manta',EffectSocket=DamageS moke01)
// VehicleEffects(11)=(EffectStartTag=EngineStart,Eff ectEndTag=EngineStop,EffectTemplate=ParticleSystem 'VH_Manta.EffectS.P_FX_Manta_Blades_Blurred',Effec tSocket=BladeSocket)
// VehicleEffects(12)=(EffectStartTag=EngineStart,Eff ectEndTag=EngineStop,EffectTemplate=ParticleSystem 'VH_Manta.EffectS.PS_Manta_Ground_FX',EffectSocket =Wing_Lft_Socket)
// VehicleEffects(13)=(EffectStartTag=EngineStart,Eff ectEndTag=EngineStop,EffectTemplate=ParticleSystem 'VH_Manta.EffectS.PS_Manta_Ground_FX',EffectSocket =Wing_rt_socket)
// VehicleEffects(14)=(EffectStartTag=EngineStart,Eff ectEndTag=EngineStop,EffectTemplate=ParticleSystem 'VH_Manta.Effects.P_VH_Manta_Exhaust',EffectSocket =ExhaustPort)
// VehicleEffects(14)=(EffectStartTag=MantaOnFire,Eff ectEndTag=MantaNormal,EffectTemplate=ParticleSyste m'Envy_Effects.Tests.Effects.P_Vehicle_Damage_1',E ffectSocket=Wing_Lft_Socket)
// VehicleEffects(15)=(EffectStartTag=MantaOnFire,Eff ectEndTag=MantaNormal,EffectTemplate=ParticleSyste m'Envy_Effects.Tests.Effects.P_Vehicle_Damage_1',E ffectSocket=Wing_Rt_Socket)
VehicleEffects(16)=(EffectStartTag=MantaOnFire,Eff ectEndTag=MantaNormal,EffectTemplate=ParticleSyste m'Envy_Effects.Tests.Effects.P_Vehicle_Damage_1',E ffectSocket=Gun_Socket_01)
VehicleEffects(17)=(EffectStartTag=MantaOnFire,Eff ectEndTag=MantaNormal,EffectTemplate=ParticleSyste m'Envy_Effects.Tests.Effects.P_Vehicle_Damage_1',E ffectSocket=Gun_Socket_02)
VehicleEffects(18)=(EffectStartTag=MantaOnFire,Eff ectEndTag=MantaNormal,EffectTemplate=ParticleSyste m'Envy_Effects.Tests.Effects.P_Vehicle_Damage_1',E ffectSocket=ExhaustPort)
//Viper..(Special Case)........................................VH_Ne crisManta.Effects.PS_Viper_Ground_FX............(t his effect is in but needs a param set. This will be the same effect for all surfaces except water which will use the same Param just swap PS to ...( Envy_Level_Effects_2.Vehicle_Water_Effects.PS_Vipe r_Water_Ground_FX ) (Param Name: Direction, MinINPUT: -5 MaxINPUT: 5) 0 is when the Vh is still, positive X=forward movemet 5 being max forward movement. -X is backwards. Y is same thing but side to side
// guess we can just have a water effect name here and then check for water and then then add and && to use only this named VehicleEffects index data
FanEffectIndex=11
GroundEffectIndices=(12,13)
WaterGroundEffect=ParticleSystem'Envy_Level_Effect s_2.Vehicle_Water_Effects.PS_Manta_Water_Effects'
FanEffectParameterName=MantaFanSpin
FlameJetEffectParameterName=Jet
DrivingAnim=Jetbike_Sitting
IconCoords=(U=859,UL=36,V=0,VL=27)
BigExplosionTemplates[0]=(Template=ParticleSystem'Envy_Effects.VH_Deaths.P _VH_Death_SMALL_Far',MinDistance=350)
BigExplosionTemplates[1]=(Template=ParticleSystem'Envy_Effects.VH_Deaths.P _VH_Death_SMALL_Near')
BigExplosionSocket=VH_Death
ExplosionSound=SoundCue'A_Vehicle_Manta.SoundCues. A_Vehicle_Manta_Explode'
HoverBoardAttachSockets=(HoverAttach00)
TeamMaterials[0]=MaterialInstanceConstant'VH_CWE_Jetbike.Materials .MIC_cwjetbike_Red'
TeamMaterials[1]=MaterialInstanceConstant'VH_CWE_Jetbike.Materials .MIC_cwjetbike_Blue'
SpawnMaterialLists[0]=(Materials=(MaterialInterface'VH_CWE_Jetbike.Mate rials.MIC_cwjetbike_Spawn_Red'))
SpawnMaterialLists[1]=(Materials=(MaterialInterface'VH_CWE_Jetbike.Mate rials.MIC_cwjetbike_Spawn_Blue'))
DrivingPhysicalMaterial=PhysicalMaterial'VH_CWE_Je tbike.Materials.cwjetbike_phydriving_mat'
DefaultPhysicalMaterial=PhysicalMaterial'VH_CWE_Je tbike.Materials.cwjetbike_phy_mat'
BurnOutMaterial[0]=MaterialInterface'VH_CWE_Jetbike.Materials.MITV_c wjetbike_Red_BO'
BurnOutMaterial[1]=MaterialInterface'VH_CWE_Jetbike.Materials.MITV_c wjetbike_Blue_BO'
// DamageMorphTargets(0)=(InfluenceBone=Damage_LtCana rd,MorphNodeName=MorphNodeW_Front,LinkedMorphNodeN ame=none,Health=70,DamagePropNames=(Damage2))
// DamageMorphTargets(1)=(InfluenceBone=Damage_RtRoto r,MorphNodeName=MorphNodeW_Right,LinkedMorphNodeNa me=none,Health=70,DamagePropNames=(Damage3))
// DamageMorphTargets(2)=(InfluenceBone=Damage_LtRoto r,MorphNodeName=MorphNodeW_Left,LinkedMorphNodeNam e=none,Health=70,DamagePropNames=(Damage3))
// DamageMorphTargets(3)=(InfluenceBone=Hatch,MorphNo deName=MorphNodeW_Rear,LinkedMorphNodeName=none,He alth=70,DamagePropNames=(Damage1))
DamageParamScaleLevels(0)=(DamageParamName=Damage1 ,Scale=1.0)
DamageParamScaleLevels(1)=(DamageParamName=Damage2 ,Scale=1.5)
DamageParamScaleLevels(2)=(DamageParamName=Damage3 ,Scale=1.5)
HudCoords=(U=228,V=143,UL=-119,VL=106)
bHasEnemyVehicleSound=true
// EnemyVehicleSound(0)=SoundNodeWave'A_Character_Rea per.BotStatus.A_BotStatus_Reaper_EnemyManta'
// EnemyVehicleSound(1)=SoundNodeWave'A_Character_Jes ter.BotStatus.A_BotStatus_Jester_EnemyManta'
}
notice i've edited // a few lines out witch i 'm still not using, this may still be a copy of the UT3 code but as i say it does work
JohNLA
03-20-2010, 06:18 PM
That is fantastic. I got my "UTVehicle_Hovcad_Content. uc to match the code you posted minus the exhaust smoke but I 'll get to that later.
Any chance I could get you to post the code for "UTVehicle_CWEJetbike.uc"
I am still getting that cpptext blocks error:confused:
geodav
03-21-2010, 03:14 PM
as mentioned i just extend from the manta
class UTVehicle_CWEJetbike_Content extends UTVehicle_Manta;
you just need to have your main root bone named Engine
tegleg
03-24-2010, 06:30 AM
hello
i have reached a point where i need to get the turret to rotate thanks to this wonderful camera script here http://utforums.epicgames.com/showthread.php?t=721726
i have been looking at the scorpion sockets, bones, animset, animtree and recreated them (i think) on my model
but it doesnt rotate
until now i have been getting round it by using cicada rockets
do i need to skin my turret to a bone or what?
geodav
03-24-2010, 03:16 PM
yes your turret needs to be skinned to a bone which is part of the vehicle rig, then in the animtree you need the have a skeletalconstraint_turret linked to your bone and then have that constaint named in your vehicles seat code
D-Rez
03-29-2010, 05:43 PM
Hey guys,
I'm also looking for ways to disable camera mouse movement and alter vehicle handling, but I'm concentrating on the handling for now as it has a massive bearing on how I design the in-game racetracks for my project.
I'm looking at the defaultproperties in my vehicle's .uc file (which is an extension of UTVehicle.uc) and I can see things like TorqueVSpeedCurve, EngineRPMCurve, GroundSpeed etc - but changing the values seems to be doing nothing in-game. Any ideas where i'm going wrong?
Also, does anyone know of any reference material for the definitions of these values, (like the Unreal Wiki) because i'm looking at them and half of them mean absolutely nothing to me. Knowing what i'm tweaking (or should be tweaking) would be really helpful.
Thanks!
-Rez
geodav
03-30-2010, 01:33 PM
check this thread for posts from Unwheeledmodeller (post 81) as he posted some info on that stuff,
if you really want to know what the values mean then take a course on automotive/engine/transmission design or just use google
TheAgent
04-04-2010, 02:42 PM
my vehicle seems to have aproblem one side of the car is lifting up and it only somewhat fixes itself when i use the scorpions boost to super speed it. but it still looks ike one side is bieng lifted up. i looked at the physics asset and still
PS : im also inside the vehicle the camera seems to be offset until i use the scorpoin boost
EDIT: I found out that the left side of the wheels dont seem to have collision they are clipping and the other side is on the Road
http://i42.tinypic.com/vz9eyv.jpg
geodav
04-04-2010, 03:02 PM
ok first check the rotations of the bones pivots, then make sure you add the bone names to the bone collision list in the mesh properties.
the camera socket is named in the seat section of the vehicle code
TheAgent
04-04-2010, 03:05 PM
where is the bone collision list? and Hi again Geo Dav :]
Edit: the rotations are all the same for all 4 wheels, it has to be the collision the bone names also look correct to me.
geodav
04-04-2010, 03:29 PM
i_ve attached a pic showing the section of the mesh properties of the scorpian
TheAgent
04-04-2010, 03:35 PM
thank you very much ill come back if i come to more troubles :]
TheAgent
04-04-2010, 03:39 PM
Its still not receiving collision for some reason
Edit: i guess i didnt figure it out, nothing seems to make the wheels on the left work and get collision with the ground
TheAgent
04-05-2010, 07:56 AM
Can anyone help me? :[ i rebuilt the wheels and bones and still the same thing , there has to be something wrong within UDK. or the code.
ALRIGHT AFTER breaking my head i figured it out!
i had to set the Z bone offset to -22 or somewhere around -20 in order for it to move the left wheels up. those can be found in the default properties of UT_Vehicle_urvehicle :]
geodav
04-05-2010, 01:45 PM
very strange, i've never had to do that before, which 3d app are you using as if you mirror bones it can cause problems in game
crapageddon
04-05-2010, 01:53 PM
Mine did this (check earlier posts). I had to reset the orientation in Maya. If that doesn't fix it it could also be the center of balance settings inside the vehicle code.
TheAgent
04-05-2010, 04:05 PM
I used maya i didnt mirror the bones i hand clicked them! but idk why it did that.
crapageddon
04-05-2010, 04:50 PM
I would redo it and pay close attention to what's happening in your joint orientations. That's what ended up fixing mine. Same thing. It turned out my car was actually oriented along the wrong axis entirely. when you turn it 90 degrees in the right direction and make sure the bones are setup that way, the car was no longer on that angle but it was front or back heavy. Then THAT is what you can edit in the code. Right now your car thinks one side is the back and one side is the front. It's not leaning to it's side, the game thinks it's front or back heavy.
Fixing orientation and THEN the COB in the code should fix it for you. Super annoying I know. I hope the future UDK simplifies things and can localize the code to maximum 2 scripts for vehicles (base vehicle class >> custom class). I'm sure there's very good reasons it's done the way it is - but finding a way of simplifying it is what'll make it more user-friendly.
TheAgent
04-05-2010, 05:29 PM
true. exactly what direction should they be orienting. i have my z facing up i think its the root bone not faced the right way. X is going from one door to the other and Y is going from the hood to the trunk.
EDIT:! Also how can i make the driver visible and use my own seating position for the driver! : D
crapageddon
04-05-2010, 05:57 PM
That's probably it. I think I remember the vehicles need to face down the -X. Rotating it in the UDK would just rotate the bones as well, keeping the problem consistent not matter how you turned it. The problem is in Maya, pre-UDK export. Just set that up the other way and it should be fine.
TheAgent
04-05-2010, 06:21 PM
alright ill try that in my next vehicle :], so you dont know how to make the player appear?, i found a bool in the manta in default properties stating : bdrivervisible true and also bseated or something like that i forget the same, i just added them to my vehicle code but nothing looks different. i looked at the manta rig to see if there is a bone to set the position of the player but i didnt see one... not even in the mantas code :[i really wanna see my driver! haha
UnWheelModeller
04-05-2010, 07:08 PM
Your player may be below the vehicle, therefore not visible. Add 20 to 30 units to the Z coordinates. For the Scorpion it is "SeatBone=Main_Root,
SeatOffset=(X=30,Y=-23,Z=-34),"
for the Manta it's "SeatOffset=(X=-30,Y=0,Z=-5),"
TheAgent
04-05-2010, 07:24 PM
how bout the seating animation? :]
Re EDIT: I found it thanks! still looking to play seating animation
I cant find the seat offset in my chevelle class. :{
XxXdanceXxX
04-05-2010, 10:03 PM
TheAgent, yeah getting a vehicle to work takes some effort you really need a programer to make sure your scripts are right. MagnumAI and I got it to work in about a week but we had alot of problems before we got it to work. My simple tutorial is not exhaustive by any means just something you help out.
TheAgent
04-05-2010, 10:26 PM
Yeah it is hard work, but its fun when u see ur 69 Chevelle Boost like a scorpion! haha but as crapageddon mentioned. my vehicle is weighted to the left making the car roll over to the left on tight right turns. ill have to redo the bone system again in the correct position, i dont want my car to shoot missles or what not so im not sure is commenting out (\\) code will cause problems
geodav
04-06-2010, 01:44 PM
not sure about not using a weapon but you still need the "seat" code to set your driver position eg:-
Seats(0)={( GunClass=class'UTVWeap_SMBikeBolters',
GunSocket=(Gun_Socket_01,Gun_Socket_02),
TurretControls=(gun_rotate_lt,gun_rotate_rt),
CameraTag=BikerViewSocket,
CameraOffset=-100,
SeatIconPos=(X=0.46,Y=0.45),
DriverDamageMult=0.75,
bSeatVisible=true,
CameraBaseOffset=(X=-20,Y=0,Z=20),
SeatOffset=(X=-20,Y=0,Z=-5),
WeaponEffects=((SocketName=Gun_Socket_01,Offset=(X =-35,Y=-3),Scale3D=(X=3.0,Y=6.0,Z=6.0)),(SocketName=Gun_So cket_02,Offset=(X=-35,Y=-3),Scale3D=(X=3.0,Y=6.0,Z=6.0)))
)}
for the rest of it check the code posted by unwheelledmodel earlier on in this thread
TheAgent
04-06-2010, 01:57 PM
i got it :} the only is that crapageddon is correct about the car being heavy on one side. it i do a sharp right turn it rolls over but im fine with that. thanks to all for the help.
bigbob85
04-12-2010, 09:49 AM
C:\UDK\UDK-2010-03\Development\Src\Tegleg\Classes\UTVehicle_Baja.u c(1020) : Error, Unrecognized member 'FindPathToObjective' in class 'UDKSquadAI'
Compile aborted due to errors.
its something to do with http://utforums.epicgames.com/showthread.php?t=720640
in UTVehicle_Scorpion they changed
return B.Squad.FindPathToObjective(B, O);
to
return UTSquadAI(B.Squad).FindPathToObjective(B, O);
hmm
now i just have to work out why its invisible
EDIT: it was invisible cos the material had dissapeared in the move to march udk
Not seeing what material has disappeared? Looks fine in the editor. I also re-applied the material in the VH_HMMWV skeletal mesh, and still no go. Only other thing I did change (other than the UTSquadAI part) other than that was in UT_VehicleFactory_Humvee.uc
VehicleClassPath="MyMod.UTVehicle_Humvee_Content"
to
VehicleClassPath="CustomVehicle.UTVehicle_Humvee_Content"
And still does not show in the game.
bigbob85
04-12-2010, 10:14 PM
Actualy, when I run it, the car dosnt show, but I get this error in the logs.
ScriptWarning: Accessed null class context 'VehicleClass'
UTVehicleFactory_Humvee HumveeMap.TheWorld:PersistentLevel.UTVehicleFactor y_Humvee_2
Function UTGame.UTVehicleFactory:Active.SpawnVehicle:00ED
UTVehicleFactory_Humvee.uc
/**
* Copyright 1998-2009 Epic Games, Inc. All Rights Reserved.
*/
class UTVehicleFactory_Humvee extends UTVehicleFactory;
defaultproperties
{
Begin Object Name=SVehicleMesh
SkeletalMesh=SkeletalMesh'VH_Humvee.VH_HMMWV'
//Translation=(X=0.0,Y=0.0,Z=-70.0) // -60 seems about perfect for exact alignment, -70 for some 'lee way'
End Object
Components.Remove(Sprite)
/*
Begin Object Name=CollisionCylinder
CollisionHeight=+80.0
CollisionRadius=+120.0
Translation=(X=-45.0,Y=0.0,Z=-10.0)
End Object
*/
VehicleClassPath="CustomVehicle.UTVehicle_Humvee_Content"
DrawScale=1.2
}
EDIT: Managed to get it all done. A few things that had to be fixed, removing the native code from UTVehicleHumvee, changing some references that goto UTVehicleWheel to UDKVehicleWheel, and for SimCarObject too. Will upload full code in just a jiffy.
what did you do to get the car to show up in game? my vehicle is also not appearing when i play but its in the editor viewport..
tegleg
05-06-2010, 06:18 AM
try a full recompile on the front end
if that dont work make sure the textures referenced in the script are actualy there in the content browser
ok got it showing up in game and can enter the vehicle but the wheels just spin on the spot and i dont go anywhere..
http://i40.photobucket.com/albums/e246/XaKu/help.jpg?t=1273184875
http://i40.photobucket.com/albums/e246/XaKu/help2.jpg?t=1273185009
geodav
05-07-2010, 02:06 PM
have you any suspention bones and if yes have you added the names to the wheels skelaton controler
have you any suspention bones and if yes have you added the names to the wheels skelaton controler
i dont have suspension bones... if i add them in maya then reimport the mesh wll i have to go through the whole process again to get it in game?
CreativeCoding
05-07-2010, 10:25 PM
Really, someone needs to sticky at least a list of all of these tutorials. They are amazing!
geodav
05-08-2010, 01:52 PM
@xaku not really just re-import your mesh and ammend the animtree entries (skelaton wheelcontrolers)
cool thanks man will do that then :)
CreativeCoding
05-10-2010, 01:25 AM
I viewed this just to get the 18,000th view.
Thank you so much!
D-Rez
05-10-2010, 07:28 AM
Hey guys,
Has anyone got any method/advice on a locked camera view for vehicles? I've been using Kismet and following tutorials for a third person player camera view but it doesn't work for vehicles (no surprises there).
I want to disable mouselook while in vehicles on my project because it has a significant impact on gameplay when driving around.
Thanks,
-Rez
geodav
05-10-2010, 01:41 PM
i think you'll need to override the vehicle camera and try and lock it to the weapon, but then again i'm out of my depth :(
got the car working - thanks for eveyones help :)
katana2665
05-24-2010, 07:03 PM
Neat design Xaku.
Beryl
05-27-2010, 05:35 PM
Hi,
I'm having issues trying to get my vehicle working. When imported into the UDK, the wheels fall through the floor. We can get inside the vehicle and aim and shoot our turret but driving in it does not work.
I've been following the Steam Punk Pirates tutorial to set up the packages and the scripts. Here's some scripts where I think the problem might lay, if anyone has any ideas, that'd be great. Thanks!
Custom Vehicle:
class VH_Enforcer extends UTVehicle
abstract;
simulated function PostBeginPlay()
{
Super.PostBeginPlay();
if(SimObj.bAutoDrive)
{
SetDriving(true);
}
if (WorldInfo.NetMode != NM_DedicatedServer && !bDeleteMe && DamageMaterialInstance[0] != none)
{
// turn off headlights
DamageMaterialInstance[0].SetScalarParameterValue('Green_Glows_Headlights', 0.f );
}
}
/**
* Are we allowing this Pawn to be based on us?
*/
simulated function bool CanBeBaseForPawn(Pawn APawn)
{
return bCanBeBaseForPawns && !bDriving;
}
/** DriverEnter()
Make Pawn P the new driver of this vehicle
*/
function bool DriverEnter(Pawn P)
{
local Pawn BasedPawn;
if ( super.DriverEnter(P) )
{
ForEach BasedActors(class'Pawn', BasedPawn)
{
if(BasedPawn != Driver)
{
BasedPawn.JumpOffPawn();
}
}
return true;
}
return false;
}
defaultproperties {
Health=300
StolenAnnouncementIndex=5
COMOffset=(x=0.0,y=5.0,z=-10.0)
UprightLiftStrength=30.0
UprightTime=1.25
UprightTorqueStrength=500.0
bCanFlip=true
bSeparateTurretFocus=true
bHasHandbrake=true
bStickDeflectionThrottle=true
GroundSpeed=10000
bLookSteerOnNormalControls=true
bLookSteerOnSimpleControls=true
LookSteerSensitivity=2.2
LookSteerDamping=0.07
ConsoleSteerScale=1.1
DeflectionReverseThresh=-0.3
Begin Object Class=UDKVehicleSimCar Name=SimObject
WheelSuspensionStiffness=100.0
WheelSuspensionDamping=3.0
WheelSuspensionBias=0.1
ChassisTorqueScale=0.0
MaxBrakeTorque=5.0
StopThreshold=100
MaxSteerAngleCurve=(Points=((InVal=0,OutVal=45),(I nVal=600.0,OutVal=15.0),(InVal=1100.0,OutVal=10.0) ,(InVal=1300.0,OutVal=6.0),(InVal=1600.0,OutVal=1. 0)))
SteerSpeed=110
LSDFactor=0.0
TorqueVSpeedCurve=(Points=((InVal=-600.0,OutVal=0.0),(InVal=-300.0,OutVal=80.0),(InVal=0.0,OutVal=130.0),(InVal =950.0,OutVal=130.0),(InVal=1050.0,OutVal=10.0),(I nVal=1150.0,OutVal=0.0)))
EngineRPMCurve=(Points=((InVal=-500.0,OutVal=2500.0),(InVal=0.0,OutVal=500.0),(InV al=549.0,OutVal=3500.0),(InVal=550.0,OutVal=1000.0 ),(InVal=849.0,OutVal=4500.0),(InVal=850.0,OutVal= 1500.0),(InVal=1100.0,OutVal=5000.0)))
EngineBrakeFactor=0.025
ThrottleSpeed=0.2
WheelInertia=0.2
NumWheelsForFullSteering=4
SteeringReductionFactor=0.0
SteeringReductionMinSpeed=1100.0
SteeringReductionSpeed=1400.0
bAutoHandbrake=true
bClampedFrictionModel=true
FrontalCollisionGripFactor=0.18
ConsoleHardTurnGripFactor=1.0
HardTurnMotorTorque=0.7
// Longitudinal tire model based on 10% slip ratio peak
WheelLongExtremumSlip=0.1
WheelLongExtremumValue=1.0
WheelLongAsymptoteSlip=2.0
WheelLongAsymptoteValue=0.6
// Lateral tire model based on slip angle (radians)
WheelLatExtremumSlip=0.35 // 20 degrees
WheelLatExtremumValue=0.9
WheelLatAsymptoteSlip=1.4 // 80 degrees
WheelLatAsymptoteValue=0.9
bAutoDrive=false
AutoDriveSteer=0.3
End Object
SimObj=SimObject
Components.Add(SimObject)
BoostSteerFactors[0] = 10.0
BoostSteerFactors[1] = 4.0
BoostSteerFactors[2] = 1.2
Begin Object Class=UTVehicleEnforcerWheel Name=RRWheel
BoneName="r_rearWheel"
BoneOffset=(X=0.0,Y=0.0,Z=0.0)
SkelControlName="BkRt_Tire_Cont"
End Object
Wheels(0)=RRWheel
Begin Object Class=UTVehicleEnforcerWheel Name=LRWheel
BoneName="l_rearWheel"
BoneOffset=(X=0.0,Y=-0.0,Z=0.0)
SkelControlName="BkLf_Tire_Cont"
End Object
Wheels(1)=LRWheel
Begin Object Class=UTVehicleEnforcerWheel Name=RFWheel
BoneName="l_frontWheel"
BoneOffset=(X=0.0,Y=0.0,Z=0.0)
SteerFactor=1.0
LongSlipFactor=2.0
LatSlipFactor=3.0
HandbrakeLongSlipFactor=0.8
HandbrakeLatSlipFactor=0.8
SkelControlName="FrRt_Tire_Cont"
End Object
Wheels(2)=RFWheel
Begin Object Class=UTVehicleEnforcerWheel Name=LFWheel
BoneName="r_frontWheel"
BoneOffset=(X=0.0,Y=-0.0,Z=0.0)
SteerFactor=1.0
LongSlipFactor=2.0
LatSlipFactor=3.0
HandbrakeLongSlipFactor=0.8
HandbrakeLatSlipFactor=0.8
SkelControlName="FrLf_Tire_Cont"
End Object
Wheels(3)=LFWheel
lockSuspensionTravel=37;
lockSuspensionStiffness=62.5;
BoostUprightTorqueFactor=-45.0
BoostUprightMaxTorque=50.0
TeamBeaconOffset=(z=60.0)
SpawnRadius=125.0
BaseEyeheight=30
Eyeheight=30
DefaultFOV=80
bLightArmor=true
CameraLag=0.07
bReducedFallingCollisionDamage=true
BladeBreakPoint=0.8
BoostReleaseDelay=0.15
SelfDestructSpeedSquared=810000.0
MomentumMult=0.5
NonPreferredVehiclePathMultiplier=1.5
HornIndex=0
}
Vehicle Content
class UTVehicle_Enforcer_Content extends VH_Enforcer;
defaultproperties
{
Begin Object Name=CollisionCylinder
CollisionHeight=40.0
CollisionRadius=100.0
Translation=(X=-25.0)
End Object
Begin Object Name=SVehicleMesh
SkeletalMesh=SkeletalMesh'VH_Enforcer.Enforcer'
AnimTreeTemplate=AnimTree'VH_Enforcer.Enforcer_Ani mTree'
PhysicsAsset=PhysicsAsset'VH_Enforcer.Enforcer_Phy sics'
AnimSets.Add(AnimSet'VH_Enforcer.Enforcer_Anims')
RBCollideWithChannels=(Default=TRUE,BlockingVolume =TRUE,GameplayPhysics=TRUE,EffectPhysics=TRUE,Vehi cle=TRUE,Untitled4=TRUE)
End Object
//DrawScale=0.25
Seats(0)={( GunClass=class'UTVWeap_ScorpionTurret',
GunSocket=(TurretFireSocket),
TurretControls=(TurretRotate),
GunPivotPoints=(gun003Tip),
CameraTag=DriverViewSocket,
CameraOffset=-300,
CameraBaseOffset=(X=-50.0,Z=20.0),
SeatIconPos=(X=0.0,Y=0.0),
bSeatVisible=true,
DriverDamageMult=0.2,
WeaponEffects=((SocketName=TurretFireSocket,Offset =(X=-14,Y=5),Scale3D=(X=2.0,Y=3.0,Z=3.0)),(SocketName=T urretFireSocket,Offset=(X=-14,Y=-5),Scale3D=(X=2.0,Y=3.0,Z=3.0)))
)}
}
geodav
05-28-2010, 01:51 PM
not trying to be funny but if your following a tutorial then ask the author for help, otherwise find a tutorial thats supported by the author here on the forums eg http://utforums.epicgames.com/showthread.php?t=706668
Beryl
05-30-2010, 03:03 AM
not trying to be funny but if your following a tutorial then ask the author for help, otherwise find a tutorial thats supported by the author here on the forums eg http://utforums.epicgames.com/showthread.php?t=706668
Just thought I would try my luck and ask in multiple places since a lot of people in this thread were helping each other out and maybe I would run into someone that might have an idea I haven't tried yet..
Also, I only mentioned that tutorial since it seemed like many were familiar with it here.
tegleg
05-30-2010, 05:00 PM
i used geodavs tutorials
to me it seems more a problem with your model
u sure the bones are set up right?
or whats you wheel code like?
UTVehicleEnforcerWheel
Beryl
06-01-2010, 11:08 AM
The Wheel Code looks like this:
Its just properties we want used for each wheel.
class UTVehicleEnforcerWheel extends UTVehicleWheel;
defaultproperties
{
WheelRadius=15
SuspensionTravel=40
bPoweredWheel=true
SteerFactor=0.0
LongSlipFactor=2.0
LatSlipFactor=2.75
HandbrakeLongSlipFactor=0.7
HandbrakeLatSlipFactor=0.3
ParkedSlipFactor=10.0
bUseMaterialSpecificEffects=true
}
And a screenshot of our rig. All the joints are children from the root, except for the turret which branches off from itself. That shouldn't be a problem should it?
http://i162.photobucket.com/albums/t270/EcchiMireiyu/enforcerRig.png
geodav
06-01-2010, 01:46 PM
if your using the march/april/may build of UDK you need to extend your wheel class from UDKVehicleWheel and not UTVehicleWheel
also try setting SuspensionTravel= to 10 or lower
ps:- try avoiding using the name "root" in your vehicle rigg
wmastiv
06-01-2010, 02:48 PM
i'm new with unreal engin i'a at my first experiment with vehicles
when udk compile the humvee script give me thir error why?
error native cclasses cannot expand non native classes
thir error is relative at this row
class UTVehicle_Humvee extends UTVehicle
native(UTVehicle)
abstract;
thank in advance
wmastiv
06-01-2010, 02:49 PM
sorry for type error
Beryl
06-01-2010, 11:07 PM
if your using the march/april/may build of UDK you need to extend your wheel class from UDKVehicleWheel and not UTVehicleWheel
also try setting SuspensionTravel= to 10 or lower
ps:- try avoiding using the name "root" in your vehicle rigg
Thanks geodav, I'll try that out. Also gonna go through your tutorial and hopefully figure something out. :)
geodav
06-02-2010, 01:33 PM
@wmastiv you need to remove the "native(UTVehicle)" line
UDK users are not allowed to use Native calls
wmastiv
06-03-2010, 04:27 AM
In the first i use the udk of april
i remove the line
"native(UTVehicle)"
or
"native(Vehicle)"
and i have the same answer
THE ANSWER IS A CTTF ERROR
and i try to sUbstitute the UTVeicle with UDKViecle like your explanation
in this way
class UTVehicle_Humvee extends UDKVehicle
native(Vehicle)
abstract;
or
class UTVehicle_Humvee extends UDKVehicle
abstract;
or
class UTVehicle_Humvee extends UDKVehicle;
but the answer is a forest of error!!!!!
thanks
geodav
06-03-2010, 01:48 PM
here's an example straight from the UDK code release (May)
class UTVehicle_Scorpion extends UTVehicle
abstract;
instead of coping someone elses code try using the code provided by epic, i know the Scorpian code won't help many people as there is a lot of exttra stuff in there but just cut it out and you'll be ok.
wmastiv
06-03-2010, 02:58 PM
in the first thank for the aid give me
when i put the code copy from your give me this error
cannot use cpptext blocks in non native classes (error on line 5)
if i use all the code of the second example ot the 85 post
compile is right bat clearly dont according with my car
what the difference
My code like your
----------------------------------------------------------
/**
* Copyright 1998-2009 Epic Games, Inc. All Rights Reserved.
*/
class UTVehicle_Scorpionx extends UTVehicle
abstract;
/** animation for the Scorpion's extendable blades */
//var UTAnimBlendByWeapon BladeBlend;
..........ecc
---------------------------------------------------------
the other code
---------------------------------------------------------
/**
* Copyright 1998-2009 Epic Games, Inc. All Rights Reserved.
*/
class UTVehicle_Scorpionx extends UTVehicle
abstract;
/* lock player in car */
var bool bLockPlayerIn;
simulated event SetInputs(float InForward, float InStrafe, float InUp)
{
super.SetInputs(InForward, InStrafe, InUp);
LookSteer();
}
..........ecc
------------------------------------------------------------------
thank i'm a very beginner
geodav
06-03-2010, 03:04 PM
can you wait till tomorrow and i'll post my LandBuggy code for you
wmastiv
06-03-2010, 04:59 PM
yes i can wait
thank too much for your help
geodav
06-04-2010, 03:20 PM
ok got to my tutorial site, on the UDK page you find a link to my LandBuggy content rar
this includes max/texture/udk/code packages should get you going
JohNLA
06-04-2010, 06:00 PM
Is anyone else having trouble downloading Geodav's land-buggy?
Fileplanets link does not seam to work for me
wmastiv
06-05-2010, 06:55 AM
i try to found helpon yor site at
http://sites.google.com/site/ut40kmod/
or
http://www.moddb.com/mods/ut40k-the-chosen
but i don't find a usefull link
thank for aid
Jerry-
06-05-2010, 11:38 AM
i'm new with unreal engin i'a at my first experiment with vehicles
when udk compile the humvee script give me thir error why?
error native cclasses cannot expand non native classes
thir error is relative at this row
class UTVehicle_Humvee extends UTVehicle
native(UTVehicle)
abstract;
thank in advance
you could try copy UTVehicle_Scorpion code paste to you file . Than change your custom vehicle's name,bone...
i have meet the same problem , i think it due to UDK version difference
hope can help u ,:) sorry my english no good...
tegleg
06-05-2010, 12:31 PM
heres my code for you
change 'Truck' to your vehicle in the file and class names
and in UTVehicle_Truck_Content change this bit to your assets
Begin Object Name=SVehicleMesh
SkeletalMesh=SkeletalMesh'VH_Truck.Mesh.SK_VH_Truc k'
AnimTreeTemplate=AnimTree'VH_Truck.Anims.AT_VH_Tru ck'
PhysicsAsset=PhysicsAsset'VH_Truck.Mesh.SK_VH_Truc k_Physics'
also in UTVehicleFactory_Truck
http://rapidshare.com/files/395607445/truck.zip
i tried to post the code but its too long so heres a zip file
let me know if you have problems with it
btw geodav i cant find the LandBuggy link anywhere on your site
wmastiv
06-05-2010, 01:47 PM
i try with your code
thank for your fast help
geodav
06-05-2010, 01:56 PM
the link works fine from here http://sites.google.com/site/ut40kmod/UT40k_mod/udk-tutorials
wmastiv
06-05-2010, 02:49 PM
now i fond the right link
i just downloaded the project thank for your aid
i hope that is the last time that i boring you with my inexperience
( now i hope to do something good with my effort)
thank a lot for the help give me
geodav
06-05-2010, 05:31 PM
we're here to help
:)
Jerry-
06-06-2010, 07:45 AM
i got the vehicle working , thanks for eveyone ,thanks geodav's tutorail
i set player camera into my car, the problem is when vehicle speed up.the camera fall behind the car. so how change camera offset when EngineStart, RocketSpeed and Engineend.
UnWheelModeller
06-10-2010, 09:59 PM
Hello Jerry, the setting you are looking for is this one; CameraLag=0.08 . Set it to 0.00
Tsepeche
06-27-2010, 12:45 AM
Hey could I get some help since this is a vehicle forum, I'm trying to do 2 things, get guns added to the vehicle via sockets for now and spawn as a vehicle. Any help guys?
Hey could I get some help since this is a vehicle forum, I'm trying to do 2 things, get guns added to the vehicle via sockets for now and spawn as a vehicle. Any help guys?
for spawning as a vehicle go to this thread. i used their code and it worked ;)
http://forums.epicgames.com/showthread.php?t=717687&highlight=vehicle+spawning
Tsepeche
06-27-2010, 09:00 PM
Ah thx Dn2, that helps a lot! Now I'm just trying to figure out how to get the guns added to the sockets.
ok im having some probs now
Just switched form the November-2 build to may one. Using this tutorial and the code there to make my car http://wiki.beyondunreal.com/UDK/Vehicle_Tutorial
Compiling it on the may build gave errors. So i changed it to extend from "UDKvehicle" and not "UTVehicle" and got more errors. Changed it back and then removed the "native" thingy and the following which seems to be dealing with AI/Bots and what not...
/** Recommend high priority charge at enemy */
function bool CriticalChargeAttack(UTBot B)
{
return (UTVehicle(B.Enemy) != None) && RecommendCharge(B, B.Enemy);
}
/** returns true if vehicle should charge attack this node (also responsible for setting up charge) */
function bool ChargeAttackObjective(UTBot B, UTGameObjective O)
{
local vector FacingDir, EnemyDir;
local float Dist;
Dist = VSize(O.Location - Location);
if ( bAISelfDestruct || (Dist < 200.0) )
{
if ( !bTryToBoost )
bAISelfDestruct = false;
}
if ( !bAISelfDestruct )
{
// only charge if already facing right if close
FacingDir = vector(Rotation);
FacingDir.Z = 0;
EnemyDir = O.Location - Location;
EnemyDir.Z = 0;
bTryToBoost = (Normal(FacingDir) dot Normal(EnemyDir) > 0.9);
if ( bTryToBoost )
{
bAISelfDestruct = true;
SetTimer(0.3, true, 'CheckScriptedSelfDestruct');
}
if ( !bTryToBoost && (Dist < 600) )
return false;
}
B.GoalString = "Charge Objective";
return B.Squad.FindPathToObjective(B, O);
}
Everything seems to be working but there is a prob with the wheels for some reason. Its crashes (when level loads in PIE ), when extended from "UTvehiclewheel" (same code that worked in november-2 udk),
/**
* Copyright 1998-2009 Epic Games, Inc. All Rights Reserved.
*/
class RaceWheel extends UTVehicleWheel;
defaultproperties
{
WheelRadius=25
SuspensionTravel=40
bPoweredWheel=true
SteerFactor=0.0
LongSlipFactor=2.0
LatSlipFactor=2.75
HandbrakeLongSlipFactor=0.7
HandbrakeLatSlipFactor=0.3
ParkedSlipFactor=10.0
bUseMaterialSpecificEffects=true
}
and isn't functional when extended form "UDKvehiclewheel" and looks like this
http://localhostr.com/files/76ff4d/carProb.jpg
its something that changed from november to the may build...the how epic has been moving stuff to the UDK base classes...
im no coder so if anyone knows what it could be thanks in advance...for now its trial and error for me :(
geodav
06-29-2010, 02:04 PM
i mention this many times use a tutorial that is supported by the author
goto my site and follow the tutorial there and download the content files
lol sorry to make you say that again >_<
**edit**
the link "Wheeled Vehicle Content", the page is coming up blank :/ for me...
geodav, can you check and see if its just on my end or not?
geodav
06-30-2010, 02:39 PM
sorry fileplanet seems to have lost the file, i'll have to dig it up from my laptop at work
please wait a day or to, i'm really sorry about this
ok no problem, i'll be waiting. thanks!:)
geodav
06-30-2010, 02:51 PM
give me 5 mins, found it hiding under Landbuggy.rar, uploading right now
try this one http://www.fileplanet.com/files/210000/213872.shtml
yay! downloading now..thanks geodav!
tegleg
07-10-2010, 02:19 PM
hello
i just cant get the vehicle guns to rotate
i tried everything i can think of
what do i need to do?
geodav
07-10-2010, 04:27 PM
is it the main turret/weapon or a secoundary,
the main problem would be the naming of the controls in the animset/code
tegleg
07-10-2010, 07:51 PM
the main weapon
im using a copy of the scorpion, cicada and manta
i used the same bone names and code
the one i have in front of me now is the manta
the bones for the guns are called Barrel_lt ...._rt
they are linked in the animset to skel controls gun_rotate_rt ......lt
and are named in the gun seat in manta_content
for the model i have an Engine bone skinned to the body
and the Barrel bones (both child of engine bone) skinned to the guns
is there anything i missed / doing wrong?
geodav
07-11-2010, 01:42 PM
with the manta, it uses looksteer which means the whole vehicle turns when you move the mouse, this means that the barrels don't need to rotate.
for other vehicles you need to make sure that your using the UTSkelControl_TurretConstrained and not the UDKSkelControl_TurretConstrained
the name needs to be entered in the code eg:-
TurretControls=(RazHB_Yaw,RazHB_Pivot),
tegleg
07-11-2010, 07:19 PM
yes the manta uses looksteer, but i thaught that was just left and right
i cant make mine fire up and down like the manta does, im thinking it might be the physics cos iv messed around quite a bit with that, or posibly i need a Fuselage bone in there?
so for a Scorpion copy it has
TurretControls=(TurretRotate),
the bone structure is
Main_Root
\
Gun_Base
\
gun_rotate
gun_rotate is linked in the animtree to TurretRotate
i skin Main_Root to the body
gun_rotate to the gun
what about Gun_Base?
sorry ill suss it in the end :(
EDIT: sidestepping a little here, i had a thaught
lots of people (including myself) would like a fixed vehicle camera
there must be some way to take some code from the manta and paste it into the scorpion
anyone tried this?
or is there already some ace tutorial or code that i didnt manage to find?
geodav
07-12-2010, 01:28 PM
ok check in the animtree control that you have set the pitch limit correctly, you can tell when playing as the crosshair(cricle) goes red
as for camera code have a look in the UT3 forums for a thread started by Xyx, it's way beyound my skill but it might help you
tegleg
07-12-2010, 06:11 PM
thanks for your help again geodav :)
i made a new car from scrach, turns out it was the animtree bah... udk is so particular
anyway
that code looks promising at first glance, but i have only just started properly looking at unreal script so im not sure where to start
here it is for anyone interested
simulated event SetInputs(float InForward, float InStrafe, float InUp)
{
super.SetInputs(InForward, InStrafe, InUp);
LookSteer();
}
private simulated function LookSteer()
{
local bool bReverseThrottle;
local rotator SteerRot, VehicleRot;
local vector SteerDir, VehicleDir, AngVel;
local float VehicleHeading, SteerHeading, DeltaTargetHeading, Deflection;
Steering = FClamp(Steering * ConsoleSteerScale, -1.0, 1.0);
// If we desire 'look steering' on this vehicle, do it here.
if(IsHumanControlled())
{
// If there is a deflection, look at the angle that its point in.
Deflection = Sqrt(Throttle*Throttle + Steering*Steering);
if(bStickDeflectionThrottle)
{
// The region we consider 'reverse' is anything below DeflectionReverseThresh, or anything withing the triangle below the center position.
bReverseThrottle = ((Throttle < DeflectionReverseThresh) || (Throttle < 0.0 && Abs(Steering) < -Throttle));
Throttle = Deflection;
if(bReverseThrottle)
{
Throttle *= -1;
}
}
VehicleRot.Yaw = Rotation.Yaw;
VehicleDir = vector(VehicleRot);
SteerRot.Yaw = DriverViewYaw;
SteerDir = vector(SteerRot);
VehicleHeading = GetHeadingAngle(VehicleDir);
SteerHeading = GetHeadingAngle(SteerDir);
DeltaTargetHeading = FindDeltaAngle(SteerHeading, VehicleHeading);
if(DeltaTargetHeading > LookSteerDeadZone)
{
Steering = FMin((DeltaTargetHeading - LookSteerDeadZone) * LookSteerSensitivity, 1.0);
}
else if(DeltaTargetHeading < -LookSteerDeadZone)
{
Steering = FMax((DeltaTargetHeading + LookSteerDeadZone) * LookSteerSensitivity, -1.0);
}
else
{
Steering = 0.0;
}
AngVel = Mesh.BodyInstance.GetUnrealWorldAngularVelocity();
Steering = FClamp(Steering + (AngVel.Z * LookSteerDamping), -1.0, 1.0);
// Reverse steering when reversing
if (Throttle < 0.0 && ForwardVel < 0.0)
{
Steering = -1.0 * Steering;
}
}
}
geodav
07-13-2010, 01:43 PM
looks interesting could do with a working looksteer for my bikes ;)
tegleg
07-14-2010, 08:36 PM
HAHA! i sussed it
so here it is, how to use looksteer with the scorpion code
open UTVehicle_Scorpion
look for these lines and add the bit in bold - LookSteer();
simulated function SetInputs(float InForward, float InStrafe, float InUp)
{
Super.SetInputs(InForward, InStrafe, InUp);
LookSteer();
then go down to the line just above defaultproperties
and add this
private simulated function LookSteer()
{
local bool bReverseThrottle;
local rotator SteerRot, VehicleRot;
local vector SteerDir, VehicleDir, AngVel;
local float VehicleHeading, SteerHeading, DeltaTargetHeading, Deflection;
Steering = FClamp(Steering * ConsoleSteerScale, -1.0, 1.0);
// If we desire 'look steering' on this vehicle, do it here.
if(IsHumanControlled())
{
// If there is a deflection, look at the angle that its point in.
Deflection = Sqrt(Throttle*Throttle + Steering*Steering);
if(bStickDeflectionThrottle)
{
// The region we consider 'reverse' is anything below DeflectionReverseThresh, or anything withing the triangle below the center position.
bReverseThrottle = ((Throttle < DeflectionReverseThresh) || (Throttle < 0.0 && Abs(Steering) < -Throttle));
Throttle = Deflection;
if(bReverseThrottle)
{
Throttle *= -1;
}
}
VehicleRot.Yaw = Rotation.Yaw;
VehicleDir = vector(VehicleRot);
SteerRot.Yaw = DriverViewYaw;
SteerDir = vector(SteerRot);
VehicleHeading = GetHeadingAngle(VehicleDir);
SteerHeading = GetHeadingAngle(SteerDir);
DeltaTargetHeading = FindDeltaAngle(SteerHeading, VehicleHeading);
if(DeltaTargetHeading > LookSteerDeadZone)
{
Steering = FMin((DeltaTargetHeading - LookSteerDeadZone) * LookSteerSensitivity, 1.0);
}
else if(DeltaTargetHeading < -LookSteerDeadZone)
{
Steering = FMax((DeltaTargetHeading + LookSteerDeadZone) * LookSteerSensitivity, -1.0);
}
else
{
Steering = 0.0;
}
AngVel = Mesh.BodyInstance.GetUnrealWorldAngularVelocity();
Steering = FClamp(Steering + (AngVel.Z * LookSteerDamping), -1.0, 1.0);
// Reverse steering when reversing
if (Throttle < 0.0 && ForwardVel < 0.0)
{
Steering = -1.0 * Steering;
}
}
}
many thanks goes out to Xyx who wrote the code for ut3 and geodav for pointing me to it :)
all i did was work out how to use it with udk
tegleg
07-16-2010, 11:18 AM
VehicleNameString???
how do you get it to say the name of the vehicle when you get in it?
in utgame.int theres this for the scorpion
[UTVehicle_Scorpion]
VehiclePositionString="in a Scorpion"
VehicleNameString="Scorpion"
but if i copy this and change the names to my vehicles it doesnt work
it just says 'Weapon'
geodav
07-16-2010, 01:55 PM
not sure atm with the July build it's not showing any names at all, might be something with scaleform but thats just me guessing
before i just adding my own int files with the games name
Tsepeche
08-12-2010, 10:36 PM
I think I may have a problem with my vehicle.. It's floating ever so slightly off the ground (maybe an inch or 2) but this is just your regular ol car. I'm not exactly sure why it's floating off the ground.. Anybody know why it's floating?
geodav
08-13-2010, 01:48 PM
try adjusting the wheel radius eg:-
/**
* Copyright 1998-2010 Epic Games, Inc. All Rights Reserved.
* bodge by Geodav for UT40k.
*/
class UTVehicleUT40kBikeWheel extends UDKVehicleWheel;
defaultproperties
{
WheelRadius=30 // works
SuspensionTravel=1.0
bPoweredWheel=true
SteerFactor=0.0
LongSlipFactor=2.0
LatSlipFactor=2.75
HandbrakeLongSlipFactor=0.7
HandbrakeLatSlipFactor=0.3
ParkedSlipFactor=10.0
bUseMaterialSpecificEffects=true
}
Tsepeche
08-13-2010, 04:14 PM
No, that didn't seem to help =\
I've noticed that after toggling the debug camera and looking at the car, the wheels themselves is what's hovering and I don't know why they go through the car.. Any ideas?
http://i997.photobucket.com/albums/af97/ryanfrrl/Capture.png
tegleg
08-14-2010, 10:17 AM
when you make the car model have the susspension at its fullest extent
and make sure SuspensionTravel=1.0 or a low number
Tsepeche
08-14-2010, 02:34 PM
well, the modeler that made the car fixed the problem as I'm just the programmer for it. I don't have to worry about it anymore then, thanks for your help guys
TorQueMoD
08-14-2010, 06:43 PM
Hey All!
So I've been following GeoDav's video tutorials without problem so far but now that I'm trying to make a wheeled vehicle, I've got a bit of a problem with the AnimTree. Specifically, with the LookAt Controls. For some reason when I link the LookAt Controls to my Axel bones, the wheels on my vehicle start spinning in wonky directions.
After playing around a bit, it seems to be a problem with the positioning of my LookAt nodes. If I move them along any one of the axis, it either makes the wheel spin faster or slower (Slower when it gets closer to the proper positioning). Problem is, with the damn thing spinning constantly, I can't get a hold of the right axis because its spinning with the node. Anyone have any ideas as to why this might be happening and how to fix it? I'm using 3DS Max 2010 and UDK.
*Update*
After fiddling a bit more, I got the idea to switch the Target Location Space to BCS_BoneSpace, move the node, switch back to BCS_OtherBoneSpace and then reset the translation # for X Y Z under the Target Location parameters. This seemed to fix all of the spinning wheel issues inside the AnimTree editor (Don't ask me why) but now when I load the vehicle up in game, the problem is still persisting. I'm guessing its something to do with the bones in my rig, but the problem is in Max they're all in the correct axis (In both world and pivot hierarchy).
*Update # 2*
After spending several hours trying to figure out why my vehicle won't work, I decided there must be something wrong with my rig, so I completely re-built it using the bones from geodav's landbuggy max file that I merged into my scene and I'm still having the exact same problem. When I load up the AnimTree, the front two wheels are constantly spinning in circles along the Y axis. For some reason this time the back wheels are fine.
Please someone help me figure out why I'm retarded!
*Update # 3 - Problem Fixed!*
All right! Maybe I'm not destined for the Special Olympics afterall! After many long hours of fiddling it finally dawned on me what I was doing wrong! During my rig in Max (I use physique not skin) I was linking the Tirel Bones to their corresponding Axel bone. DO NOT DO THIS!!! What happened is the axis and wheel were already linked in Max and then I was trying to re-link them together in the AnimTree. The solution was Re-linking all of the bones and keeping the Tires and Axels separate from each other and directly linked to the Main_Root bone.
And I can't remember who said it first, but yes MAKE SURE YOU KEEP EPIC's Bone Naming Convention!!!! If you name your bones the same, you can literally copy the Scorpion's (or any other vehicle) AnimTree, delete the references to bones/items you don't have (Blades, AnimSet, Hood, Hatch, Damage Spring etc.) and Bob's your uncle!
Now if I can just figure out how to get the damn vehicle moving faster (yes I read through those posts, looking into it now) then I'll be rocking it!
Thanks to everyone on the forums for creating this post and filling it with all sorts of feedback and special thanks to GeoDav for creating his vehicle tutorials in the first place!
Kyle_Katarn
08-15-2010, 02:10 AM
No, that didn't seem to help =\
I've noticed that after toggling the debug camera and looking at the car, the wheels themselves is what's hovering and I don't know why they go through the car.. Any ideas?
http://i997.photobucket.com/albums/af97/ryanfrrl/Capture.png
Oh dude, how did you do that? Being able to visualise the wheel would be so helpful. I found the command to toggle the debug camera, but it doesn't seem to generate the wheels.
TorQueMoD
08-15-2010, 03:02 AM
So does anyone actually know how to speed up a custom vehicle so that it moves faster than the Scorpion? I tried playing with some of the default properties settings in the vehicle's.uc file, but I obviously changed too many numbers at once because it made my vehicle stop moving all together :P
I could keep fiddling, but if someone knows the direct approach would be much preferred.
Thanks!
tegleg
08-15-2010, 09:24 AM
its this bit you have to mess with in UTVehicle_YourCar
TorqueVSpeedCurve=(Points=((InVal=-200.0,OutVal=100),(InVal=-100.0,OutVal=2080.0),(InVal=0.0,OutVal=1130.0),(In Val=3950.0,OutVal=130.0),(InVal=51050.0,OutVal=10. 0),(InVal=91150.0,OutVal=0.0)))
TorqueVSpeedCurve is a kind of simulated gearbox - reverse, first gear, second...
i got this by experimenting but it takes a long time having to recompile the script every change
its not perfect but the car moves at a decent speed
if anyone has a better one id love to see the code
TorQueMoD
08-15-2010, 11:30 AM
Thanks for the info Teg!
I also found that the size of your mesh greatly determines the speed of the vehicle. Mine was nearly 2 times the size of the Scorpion so when I scaled it down, it really sped things up (The scorpion is approximately 150units wide, 208 long and 120 tall for anyone wondering).
Here's something that I just discovered though... After re-importing my skeletal mesh, I updated the Physics Asset and forgot to assign the Physics Material to the collision mesh. I went back into the PA file, linked the collision to my PhysMat and hopped back in game. My car constantly started going about 40 feet before spinning out in a 360 and stopping. No matter what, I couldn't get it to drive straight. I went back in an unlinked the PhysMat file from my collision and the car drives like normal again. Anyone know why this might be happening? The PhysMat file is almost identical to the scorpions. I'm gonna re-create it and see what happens. Oh, and without the PhysMat file, I can drive straight, but turning is REALLY REALLY slow and sometimes doesn't work.
geodav
08-15-2010, 01:37 PM
here's something i try when i get problems, use the stuff form epics content eg in your case the scorpians physmat, don't forget there are 2 versions the normal and the driving
TorQueMoD
08-15-2010, 01:54 PM
Yeah, I did that actually. The funny thing though is that in your video overview, you named the PhsyMat VH_name and VH_Name_Driving but Epic uses vh_NameDriving without the underscore... not sure if that really makes a difference as long as you reference it properly in the VH_Name.uc file but just thought I'd mention it.
Also, I duplicated the Scorpion's Physmat and and replaced mine and it seemed to fix the problem, my vehicle steering was perfect... the really weird thing though, is that it slowed down my vehicle again back to the normal Scorpion speed and I didn't touch the uc files. I opened both the PhysMats again and changed the Density from Epic's 1.5 to 1.0. I also changed the Collision MassScale to 1.0 as I thought it was probably linked... the result was that my speed went back up to normal, but I lost steering control.
It seems somehow that the PhysMat Density setting and Collision MassScale have to be at 1.5 to get the steering to work, but this affects the speed of the vehicle somehow too. More tweaking time for me.
*Update*
It seems that this was a glitch of some kind (maybe I didn't save the package) because I deleted my PhysMat files and re-copied the scorpion's (again) leaving them at the default values and my speed is still fast, but my steering is buggered. When I hold down the accelerate key, it seems to lock my steering... it takes FOREVER to turn, but when I tap accelerate and slow down a bit, then start steering, everything is ok. My vehicle model is a sports car design, you think there's any chance that it might have something to do with the tires rubbing against the body of the car? I know that sounds dumb, but its the only physical difference I can think of between the two.
Or maybe I'm thinking too much into it and its just my UC file settings not playing well together. Essentially I just doubled all the default values since I don't know what does what. Any official Epic guys want to give us a plain english explanation of the curve values?
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.