Hello,
When I create a AGSModelSceneSymbol with a dae file and symbolSizeUnits is set to .dips, the size of the object changes when I rotate the object (heading).
I assume you're trying to keep always the same width of the object. But when the object isn't circular and I rotate the object it's normal that the width of the displayed object changes.
I attached a sample project of a symbol with a marker. When I animate the heading, we clearly see that the object size is changing.
Best regards,
Solved! Go to Solution.
Using the following method :
let renderer = AGSSimpleRenderer()
renderer.sceneProperties?.headingExpression = "[HEADING]"
graphicsOverlay.renderer = renderer
....
graphic.attributes["HEADING"] = heading
Instead of just simply "symbol.heading = angle" fixed the problem.
This may need to me mentioned in the documentation.
Thank you
Using the following method :
let renderer = AGSSimpleRenderer()
renderer.sceneProperties?.headingExpression = "[HEADING]"
graphicsOverlay.renderer = renderer
....
graphic.attributes["HEADING"] = heading
Instead of just simply "symbol.heading = angle" fixed the problem.
This may need to me mentioned in the documentation.
Thank you
Hi Youssef, thank you for reaching out! I've ran your sample and your proposed solution. I'll research to see if there's a simpler way and will keep you updated.
Thank you very much 🙂
Hi Youssef. I've completed my research on your question and the solution you've suggested above is the best approach to take for this problem.
Since a 3D model may have an unwanted initial orientation, the symbol's heading, pitch, and roll properties are provided as a way to customize their initial orientation. Using these properties to produce an animation is an expensive operation and can lead to unexpected results (take your issue reported here example).
Using the heading expression that you've found is the recommended way to produce an animation. I've attached a modified version of your view controller, where I've implemented the recommended approach.
I'd also like to point you to our Samples application that can be a good source of best practices. For this specific question, please refer to the Animate 3D Graphic sample.
I hope this information helps, please feel free to reply if you have any further questions!
Yes indeed, I actually got the solution from that sample.
Thank you for your help and your research.
Sincerely,