[Help] Steeringwheel

Making or wanting help making your own asset? Check in here
Post Reply
dkleader
Posts: 35
Joined: 2009-07-31 10:55

[Help] Steeringwheel

Post 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!

Image
Im Working For Illution
Illution.dk
m111
Posts: 55
Joined: 2012-02-06 18:05

Re: [Help] Steeringwheel

Post by m111 »

I think the pivot has very low position. Try to move to the centre of steeringwheel
J.F.Leusch69
Retired PR Developer
Posts: 2988
Joined: 2008-04-23 16:37

Re: [Help] Steeringwheel

Post by J.F.Leusch69 »

try different axis in the rot bundle
dkleader
Posts: 35
Joined: 2009-07-31 10:55

Re: [Help] Steeringwheel

Post by dkleader »

Ok thanks i try that :-)

Image
Im Working For Illution
Illution.dk
dkleader
Posts: 35
Joined: 2009-07-31 10:55

Re: [Help] Steeringwheel

Post 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?

Image
Im Working For Illution
Illution.dk
dkleader
Posts: 35
Joined: 2009-07-31 10:55

Re: [Help] Steeringwheel

Post 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.

Image
Im Working For Illution
Illution.dk
J.F.Leusch69
Retired PR Developer
Posts: 2988
Joined: 2008-04-23 16:37

Re: [Help] Steeringwheel

Post 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
dkleader
Posts: 35
Joined: 2009-07-31 10:55

Re: [Help] Steeringwheel

Post 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 :-)

Image
Im Working For Illution
Illution.dk
J.F.Leusch69
Retired PR Developer
Posts: 2988
Joined: 2008-04-23 16:37

Re: [Help] Steeringwheel

Post by J.F.Leusch69 »

you can reduze the loading time by removing all not needed content from pr_edit.
dkleader
Posts: 35
Joined: 2009-07-31 10:55

Re: [Help] Steeringwheel

Post by dkleader »

Ok that sounds like an ideer how much can i remove?

Image
Im Working For Illution
Illution.dk
J.F.Leusch69
Retired PR Developer
Posts: 2988
Joined: 2008-04-23 16:37

Re: [Help] Steeringwheel

Post 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.
dkleader
Posts: 35
Joined: 2009-07-31 10:55

Re: [Help] Steeringwheel

Post by dkleader »

Ok I'll try that, thanks for the advice :-)

Image
Im Working For Illution
Illution.dk
Rhino
Retired PR Developer
Posts: 47909
Joined: 2005-12-13 20:00

Re: [Help] Steeringwheel

Post 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 ;)
Image
Post Reply

Return to “PR:BF2 Community Modding”