- This topic has 3 replies, 2 voices, and was last updated 7 years, 2 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Using SOFA › [SOLVED] set up camera following a tool in the scene
Tagged: 64_bits, SOFA_1608, Windows_81
Hello all,
I’m thinking of attaching a camera to a tool that interact to other objects in the scene, using <OglViewport screenPosition=”0 850″ screenSize=”300 300″ cameraRigid=”…” drawCamera=”1″ />. The problem is I don’t know what to put in cameraRigid, the camera is at the tip of the tool, so it has a displacement from the center of the tool. If I just use the .position parameter of the mechanical state, the result is way off…, any ideas? Thanks in advance!
Best,
Yannie
Dear @yannie,
the OglViewport can be driven by a simulated point indeed. There is two options for this:
Hope this helps.
Hugo
Thanks Hugo, I looked into the code, it seems I have to write things in code, I can’t achieve it by just writing the scene file.
alright, keep us updated and do not hesitate to share it! It could be interesting to others!
Cheers
Hugo
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.