olexale / arkit_flutter_plugin

ARKit Flutter Plugin
MIT License
797 stars 225 forks source link

[Question] Where is the pivot property? #76

Open James-A-White opened 4 years ago

James-A-White commented 4 years ago

Just curious, on the SCNNode object there is a pivot property, I don't see that exposed in ARKit. I'm sure I must be missing something basic.

I'm trying to rotate text around its centerpoint and (evidently) to do that I need to access the pivot property.

Many thanks for the great package! I'm having so much fun working with AR!

olexale commented 4 years ago

Unfortunately, it's not there yet. ARKit is huge, hence I'm adding the functionality only when someone needs it. It should be easy to bridge the pivot property, hence I'll do that right after I finish with another task.

James-A-White commented 4 years ago

Excellent! Many thanks!

Rohithgilla12 commented 4 years ago

Hey @olexale if you can guide me I can take this issue 😄

olexale commented 4 years ago

Hi @Rohithgilla12 . Sure, the code will be identical to any other node's property. You may pick, for example, position as a reference. The only difference is that the pivot is a matrix, hence you'll need to use not vector3 converter, but matrix4. Feel free to ping me in case of any questions. Thanks!!

Rohithgilla12 commented 4 years ago

Sure, I will give it a try and ping you if I struck anywhere. I guess I need to make changes in this file https://github.com/olexale/arkit_flutter_plugin/blob/master/lib/arkit_node.dart and use one of the converter from https://github.com/olexale/arkit_flutter_plugin/blob/master/lib/utils/json_converters.dart

Awesome, can you assign the issue to me, I will start working on it.