How can I print inserted asset world position and orientation?

204
1
08-31-2017 09:07 AM
CatalinBoitor
New Contributor

Hello,

I am having issues extracting the correct rotation of inserted assets(our inhouse made models) from city engine.

We use city engine to generate big city layouts for an airplane video game. We have successfully used the export models to fbx/collada method but it slows down the process considerably. City engine crashes a lot on very large maps and 3ds max cannot handle big scenes.

Ideally I would like to print out the: model, position and orientation to console and use that information into our engine. The problem is the convert function doesn't return the correct orientation - convert(y, scope, world, orient, 0, 0, 0) .

My question: Is there a way I can extract the model world rotation from city engine?

Script snippet

BuildingPlace -->

   center(xz)

   i(RightAsset,yUp,keepSizeAlignPosition)
   texture(buildingAssetTex)

#print("asset rotation " +  convert(y, scope, world, orient, 0, 0, 0)) #this is incorrect

#print("asset rotation " +  convert(y, geometry?!, world, orient, 0, 0, 0)) #this is what I would like to export

I have attached 2 images to illustrate the issue.

Thank you

0 Kudos
1 Reply
CherylLau
Esri Regular Contributor

Would you be able to post a scene with one or two lots that print the incorrect rotation and the rule file?

0 Kudos