question

Philippe M avatar image
1 Like"
Philippe M asked Philippe M commented

Is it possible to get absolute positions for Flowitems

Dear all,
The Oculus Touch VR model is a very nice example of how the Oculus touch can interact with Flexsim.
Let's hope the interaction process gets streamlined even further !

I am trying to grab flowitems in a queue with the Oculus Touch and release it on a processor. The issue is that the flowitems get assigned "relative" positions with respect to, I believe, the queue in which they are created.

Is there a way to get/set their absolute position in the Model ? That way it would be easier to determine the closest flowitem to the Oculus Touch and to move it with the hand movement.

I stay available for further details if needed.
Thanks immensely for the help !

Cheers,
Philippe

FlexSim 17.2.2
vroculus
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Matthew Gillespie avatar image
1 Like"
Matthew Gillespie answered Philippe M commented

You can use the project method on the Vec3 class to convert a position from one coordinate space to another.

For example, to get the position of a flowitem inside a queue in model coordinates:

Object item = model().find("Queue1").first;
return item.location.project(item.up, model());

To set the same item's position to the model's origin:

item.location = Vec3(0,0,0).project(model(), item.up);
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Philippe M avatar image Philippe M commented ·

Hi Matthew,
Thanks for the quick response. It works like a charm and I didn't think of this method.

0 Likes 0 ·