Page 1 of 1

[Help] Steeringwheel

Posted: 2012-05-12 10:13
by dkleader
Hey!

I have almost finished this vehicle "Westfalia", but I ran in a problem. The steeringwheel in the truck is only moving to the sides and not rotatiting? Anyone got a clue what i could be missing or what could be wrong?
Here's the code:
Here's the con script for the steering wheel

Code: Select all

ObjectTemplate.addTemplate westfalia_aSteeringwheel
ObjectTemplate.setPosition -0.3468/0.5832/1.7773
ObjectTemplate.setRotation -90/0/-26

ObjectTemplate.create RotationalBundle westfalia_aSteeringwheel
ObjectTemplate.collisionPart 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType 3
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.geometryPart 1
and here's the .tweak lines4

Code: Select all

rem ---------------------------- Steering -----------------------------------
ObjectTemplate.activeSafe RotationalBundle westfalia_aSteeringwheel
ObjectTemplate.modifiedByUser "dkleader"
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh

rem ---------------------------- Steering Rotation ---------------------------
ObjectTemplate.addTemplate S_westfalia_aSteeringwheel_RotationRpm

ObjectTemplate.setMinRotation 0/0/-30
ObjectTemplate.setMaxRotation 0/0/30
ObjectTemplate.setMaxSpeed 0/0/100
ObjectTemplate.setAcceleration 0/0/-90
ObjectTemplate.setInputToRoll PIYaw
ObjectTemplate.setAutomaticReset 1
ObjectTemplate.setAutomaticReset 1

ObjectTemplate.activeSafe Sound S_westfalia_aSteeringwheel_RotationRpm
ObjectTemplate.modifiedByUser "dkleader"
https://www.dropbox.com/s/2yq69qp8njp1f ... -05-12.rar

Thanks in advance!

Re: [Help] Steeringwheel

Posted: 2012-05-12 10:49
by m111
I think the pivot has very low position. Try to move to the centre of steeringwheel

Re: [Help] Steeringwheel

Posted: 2012-05-12 11:19
by J.F.Leusch69
try different axis in the rot bundle

Re: [Help] Steeringwheel

Posted: 2012-05-12 11:44
by dkleader
Ok thanks i try that :-)

Re: [Help] Steeringwheel

Posted: 2012-05-12 12:57
by dkleader
I have added this line

Code: Select all

ObjectTemplate.setInputToYaw PIYaw
to the

Code: Select all

 ObjectTemplate.activeSafe RotationalBundle westfalia_aSteeringwheel 
and changed this

Code: Select all

ObjectTemplate.setMinRotation 0/0/-30
ObjectTemplate.setMaxRotation 0/0/30
 
to this

Code: Select all

 ObjectTemplate.setMinRotation 0/-30/0
ObjectTemplate.setMaxRotation 0/30/0 
and changed the acceleration of the

Code: Select all

 ObjectTemplate.addTemplate S_westfalia_aSteeringwheel_RotationRpm 
to

Code: Select all

 ObjectTemplate.setAcceleration 0/-150/0 
is that what you meant [R-DEV]J.F.Leusch69 or?
I have only worked with modding for BF2 for 2 and a half week some I'm not that stong in the Con and Tweak grammer yet. But the Steeringwheel isn't turning now, now it's just stuck?

Re: [Help] Steeringwheel

Posted: 2012-05-12 16:06
by dkleader
Thats for you helper, the ideer with changing the axis worked, Thanks!
If anyone else should run into the problem here is the working tweak code:

Code: Select all

rem ---------------------------- Steering -----------------------------------
ObjectTemplate.activeSafe RotationalBundle westfalia_Steeringwheel
ObjectTemplate.modifiedByUser "dkleader"
ObjectTemplate.setNetworkableInfo BasicInfo
rem ObjectTemplate.PivotPosition 0/0/1.4
ObjectTemplate.setInputToPitch PIYaw
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Mesh

rem ---------------------------- Steering Rotation ---------------------------
ObjectTemplate.addTemplate S_westfalia_Steeringwheel_RotationRpm
ObjectTemplate.setMinRotation 0/-30/0
ObjectTemplate.setMaxRotation 0/30/0
ObjectTemplate.setMaxSpeed 0/1/0
ObjectTemplate.setAcceleration 0/-90/0
ObjectTemplate.setAutomaticReset 1

ObjectTemplate.activeSafe Sound S_westfalia_Steeringwheel_RotationRpm
ObjectTemplate.modifiedByUser "dkleader"
I changed the axis to Pitch and moved the values from MaxSpeed etc to the second value instead of the third, so it's Yaw/Pitch/Roll.

Re: [Help] Steeringwheel

Posted: 2012-05-12 16:49
by J.F.Leusch69
best thing to get these things done is the editor as you can easily change the values live and test, but remember that sometimes the editor tends to not save things like you want them to/overwrites/deletes stuff

Re: [Help] Steeringwheel

Posted: 2012-05-15 19:14
by dkleader
Yeah i realized that now after trying to get used to the Editor, before i just used Sublime Text 2 as i normally do :-) But opening the editor or PR_Edit takes to much time, thanks for the tip :-)

Re: [Help] Steeringwheel

Posted: 2012-05-18 13:58
by J.F.Leusch69
you can reduze the loading time by removing all not needed content from pr_edit.

Re: [Help] Steeringwheel

Posted: 2012-05-18 14:49
by dkleader
Ok that sounds like an ideer how much can i remove?

Re: [Help] Steeringwheel

Posted: 2012-05-18 14:57
by J.F.Leusch69
for example if you are working on a air vehicle, all you need is the air folder and maybe the weapons/arment/misslies

the rest of the objects can go.

if you have removed too much, you will either get a crash, or a red line/error in the consol, you should be able to just add in the missing stuff while running the editor.

Re: [Help] Steeringwheel

Posted: 2012-05-21 09:02
by dkleader
Ok I'll try that, thanks for the advice :-)

Re: [Help] Steeringwheel

Posted: 2012-05-21 09:05
by Rhino
or if you have some spare cash, an SSD can drastically increase editor (and bf2/pr) load times providing the editor, bf2 and mods are installed on it ;)