|Category||Farming Simulator 2011|
|Hel Zole (Unknown)||28.12.2010 17:25|
|How to get queried the trailerAttacherJoints position?
for k,v in pairs(self.attacherJoints) do
local x,y,z = getWorldTranslation(v.object);
renderText(0.5, 0.5, 0.03, string.format(x));
renderText(0.5, 0.4, 0.03, string.format(y));
renderText(0.5, 0.3, 0.03, string.format(z));
|Stefan Geiger - GIANTS Software||03.01.2011 10:23|
|There is no attribute called "object" in the attacher joints. The attribute you are looking for is called jointTransform.
This is the transform group you specified with the "index" attribute in the xml.
However with this code you will also get the non-trailer attacher joints.
There is an attribute "jointType" you can query to find out if it is a trailer joint.
if v.jointType == Vehicle.JOINTTYPE_TRAILER or v.jointType == Vehicle.JOINTTYPE_TRAILERLOW then
-- v is a trailer joint
Note: Log in to post. Create a new account here.