SchneiH2 Posted March 24, 2014 Report Posted March 24, 2014 Hi everybody I am working on a 3D cockpit with Blender26 and came to the following problems. Would be great if somebody can help or advise other XP10 developer forums. 1. When I try to use datarefs which are intended for customized 3D cokpits (?), i.e. Sim/cockpit2/engine/actuators/throttle_ratio it doesn't work. However, using sim/flightmodel/engine/ENGN_thro[0] works. Also other ...cockpit2-datarefs like gear handle etc, do not work. Any idea what's wrong? 2. When I assign 'sim/flightmodel/engine/ENGN_thro[0]' to the throttle lever it is shown in XP10 bottom up. So far I solved the problem by turning the throttle lever in Blender by 180°, however, this is not a very elegant solution. Thank you very much for possible help. Best regardsSH Quote
ilias.tselios Posted March 24, 2014 Report Posted March 24, 2014 What you have been using? sim/cockpit2/engine/actuators/throttle_ratio or sim/cockpit2/engine/actuators/throttle_ratio[0]? Quote
SchneiH2 Posted March 25, 2014 Author Report Posted March 25, 2014 Thank you for the reply. I am pretty sure that I have used sim/cockpit2/engine/actuators/throttle_ratio[0], however, I will countercheck and let you know. The problem is that also other 'simple' actuators like Sim/cockpit2/controls/gear_handle_down do not work. But, as I said I will countecheck to be sure.Any idea regarding the second topic, i.e. that objects are mirrored when assigning a dataref? Kind regardsSH Quote
tkyler Posted March 25, 2014 Report Posted March 25, 2014 Based on the exact example you wrote above, the newer throttle dataref needs a array index after it, like [0] just like the old one does. If you forgot that, then it definitely wouldn't work. The "old" sim/cockpit and newer sim/cockpit2 datarefs will mirror each other when applicable. The old ones are mostly deprecated for aircraft dev and OBJ use. I don't believe I have used an "old dataref...(sim/cockpit) in quite some time and I've done quite a few planes top to bottom. If you did use the [0] index with the newer throttle dataref and it still does not work, then there is something else at play because all the datarefs work fine. A sure-fire way for us to help diagnose is to post the cockpit *.obj file here for examination (the exported text file, not the blender one). TomK Quote
SchneiH2 Posted March 26, 2014 Author Report Posted March 26, 2014 HiFirst of all thank ou for the reply. Below the code from the obj-file that works (although the throttle lever in Blender is botom up): ANIM_begin ANIM_trans -0.007201 0.037371 -1.662394 -0.007201 0.037371 -1.662394 0 0 none ANIM_rotate_begin 1.000000 0.000000 0.000000 sim/flightmodel/engine/ENGN_thro[0] ANIM_rotate_key 0.000000 38.182745 ANIM_rotate_key 1.000000 -31.842144 ANIM_rotate_end ANIM_rotate_begin 0.000000 1.000000 0.000000 sim/flightmodel/engine/ENGN_thro[0] ANIM_rotate_key 0.000000 180.000005 ANIM_rotate_key 1.000000 180.000005 ANIM_rotate_end ATTR_no_cockpit ATTR_cockpit TRIS 3021 912ANIM_end This code doesn't work (perhaps the Dataref is wrong?): ANIM_begin ANIM_trans -0.052009 0.037371 -1.662394 -0.052009 0.037371 -1.662394 0 0 none ANIM_rotate_begin 1.000000 0.000000 0.000000 Sim/cockpit2/engine/actuators/throttle_ratio[0] ANIM_rotate_key 0.000000 38.446086 ANIM_rotate_key 1.000000 -31.842144 ANIM_rotate_end ANIM_rotate_begin 0.000000 1.000000 0.000000 Sim/cockpit2/engine/actuators/throttle_ratio[0] ANIM_rotate_key 0.000000 180.000005 ANIM_rotate_key 1.000000 180.000005 ANIM_rotate_end ATTR_no_cockpit ATTR_cockpit TRIS 3933 912ANIM_end In the contrary to my last post I have meanwhile checked that sim/cockpit2/controls/gear_handle_down works well. Strangely I do not have a problem here with the orientation of the gear lever. Perhaps I do something wrong in Blender?Thank you up-front for any help/comments.SH Quote
Tonka Posted March 26, 2014 Report Posted March 26, 2014 Typo, remove the capital S on sim. Made that same mistake myself after copying and pasting datarefs a few times. Quote
SchneiH2 Posted March 28, 2014 Author Report Posted March 28, 2014 Thank you very much!!! Stupid simple - but this is the solution! I've changed the captial letter and it works. Any idea regarding this strange thing with the orientation of the throttle lever. Again, the problem is that in Blender it has the right orientation and as soon as I assign a Dataref it appears turned by 180° in XPlane. Thanks for possible help. SH Quote
liser Posted April 1, 2014 Report Posted April 1, 2014 Try to apply rotations before exporting. Quote
SchneiH2 Posted April 2, 2014 Author Report Posted April 2, 2014 Thank you very much for the reply. As I am still learning Blender I should be most grateful if you could give some more explanations what exactly do you mean.What I did so far is to create the throttle lever in Blender (with right orientation), added two keyframes for the minimum/maximum rotation around the x-axis and applied the dataref + datare-keyframes accordingly. Everything works well except the mentioned fact that the levers appear bottom up in XPlane. Thus I had to rotate them in Blender by 180° (now in Blender the lever head looks down) to have them shown correctly in XPlane.Thank you up-front for a possible more detailed explanation.Best regardsSH Quote
Kieran Posted April 2, 2014 Report Posted April 2, 2014 Select the object/s that make up the throttle leaver (the one you rotated by 180°) and press Ctrl + 'A' and select rotation. Quote
SchneiH2 Posted April 3, 2014 Author Report Posted April 3, 2014 Hi KieranThank you for the advice, however, it doesn't work. Perhaps, I am not familiar enough with Blender. Actually, I do not understand the meaning/effect of the 'Apply object tranformation' command. When executing 'Ctrl + A' + Rotation on the left Blender panel appears an additional menu showing 3 ckeck boxes whereby 'Rotation' is ticked. The orientation of the object does not change. However, when ticking off + on the check box the object is being rotated in a strange way arount the x and y axis. Whatsoever, when exporting the obj in XPlane nothing changes, i.e. the orientation of the throttle lever remains wrong. I guess that it is more to do with my lack of knowledge in Blender since some other objects behave normal. However, if you/somebody else should have another idea what might be wrong I will be very grateful.Is it possible to post a screenshot in the forum to make the problem more visible? Thanks and regards SH Quote
Kieran Posted April 3, 2014 Report Posted April 3, 2014 (edited) Any chance you could upload the .blend of the throttle? I'm not exactly sure what the problem is, but if you can upload the .blend I'll take a look and see if I can find what wrong. Edited April 3, 2014 by Kieran Quote
SchneiH2 Posted April 3, 2014 Author Report Posted April 3, 2014 Sorry for my stupid question - but how to upload anything in the forum. I tried to upload a pic (screenshot) from Blender (with an URL to my local machine???), however, it displayed only a kind of icon.So if you could give a hint how to upload, no problem with the blend.file. I am not working on anything commercial, so no problem to distribute files. Best regardsSH Quote
Kieran Posted April 3, 2014 Report Posted April 3, 2014 Click the 'More Reply Options' at the bottom left corner of the box. It should bring up a page looking like this:From there click "Choose Files..." select the .blend and upload it. Quote
SchneiH2 Posted April 3, 2014 Author Report Posted April 3, 2014 Got a message that I am not allowed to post .blend-files. At least the previous post shows the snapshot of the situation. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.