Rotate camera function

Hello,
I'm starting to write a code for Acrobat and 3d Objects.
What I need is a function that rotates an object given a yaw and a pitch (i.e. rotateObjectYaw(45) to rotate the object 45 degrees around, rotating the camera, not the object itself).
I started modifying the CameraRotate.js and I already made it work eliminating the friction effect and performing the full delta change in one iteration.
Yaw works perfectly, but the problem is the pitch. If I rotate the Yaw first, the pitch does not rotate around the changed axis but on the original pitch axis. I guess the problem lies somewhere around:
        // Update camera direction
        var x = Math.sin( yaw   ) * Math.cos( pitch );
        var y = Math.cos( yaw   ) * Math.cos( pitch );
        var z = Math.sin( pitch );
        cameraDirection.set( x, y, z );
        // Update camera position
        trueCameraPos.set(targetPosition);
        trueCameraPos.addScaledInPlace(cameraDirection, cameraDistance * GlobalZoomScale);
        camera.up.set(targetPosition.x, targetPosition.y, targetPosition.z + cameraDistance);
        camera.position.set(trueCameraPos);
        camera.targetPosition.set(targetPosition);
But I'm not sure, and I have no idea about vector space calculations and so. Can somebody help me out?

Mike,
Can you put this in the Rich Media & 3D forum: http://forums.adobe.com/community/acrobat/acrobat_3d_features

Similar Messages

  • Create "Rotate Picture" function for Iphone Camera?

    Just wondering - why hasn't Apple added a "rotate" image function on the iphone? I receive MMS photos or send photos to others that aren't in the necessarily "right" orientation. They should really allow this function within the phone itself without having to sync to iPhoto..hmmm.
    Hope someone at apple reads this suggestion.
    Message was edited by: bootknots

    No one from Apple here. Go here... http://www.apple.com/feedback/iphone.html

  • Hi, i installed ios 5 for my iphone 4 and the camera function on lock screen was on the first few days , now it doesn't show the lock screen . is there any change i can do . Pls help me to solve the issue.

    hi, i installed ios 5 for my iphone 4 and the camera function on lock screen was on the first few days , now it doesn't show the lock screen . is there any change i can do . Pls help me to solve the issue.

    nishaadp wrote:
    ... it stucks with the apple logo ,  nothing works. Is anything i can do?
    See Here for
    Frozen or unresponsive iPhone

  • What is the problem when your camera function doesn't work and lags?

    What's the problem when the camera function doesnt work and lags? Can my iPod touch be returned because of this? I have done nothing to damage the product.

    My file association for jpg files is correct, if i click on a
    jpg, ACDSee starts immediately.Although I am a long time Windoze non-user, I vaguely remember that there's a difference between correct file-type association being set and some application starting at a mouse click on a file icon. I also vaguely remember Windoze file-type association mechanism uses a few action-types. Java Desktop should expect a specific action-type for the association.

  • E7 - Problem with camera function

    My Nokia E7 recently started to give me the following message when I select the camera function: 'Unexpected error occured. Restart phone.'
    Restarting, even rebooting, does not make this go away. Can anybody help me to get he camera working again, please?

    You could try re-installing the firmware, also check where you are saving your images, set ti to E mass memory. Other than that, I could only suggest a reset, but only as a last resort, as it's a pain and takes a lot of time and effort to re-install all your apps and media and set up the phone again. As the E7 is such a new model, I'd take it to a Nokia Care Point to get it repaired/replaced, but you could try resetting first ? It's a great handset and I love mine , but it should be working correctly and the EDOF camera is very much software based, so resetting and re-installing the firmware may help.
    Good Luck
    If I have helped at all, a click on the White Star is always appreciated :
    you can also help others by marking 'accept as solution' 

  • IOS4 4.1 firmware update causes camera function to malfunction

    After updating to firmware 4.1, the camera function is not working properly.
    The images taken are not in a red hue from the normal picture. Is there anyway to fix this or should I revert back to the previous firmware?

    Update on my prior post. I used Disk Utility and Disk Warrior on each of the four disks that were connected to my AEB. DU and DW found and fixed damage on every disk. While that was going on, I reverted to firmware 7.3.2. Reconnected my disks to the USB hub, connected the hub to the AEB and all four disks show up just as they did before the 7.4.1 update.
    Using the retrospectoscope, I should have disconnected the USB devices before applying the update. Think I will stick with 7.3.2 for the foreseeable future.

  • Camera function is not working

    The camera function is not working on my iPhone 5 that was only bought on 19/1/2013.  Whne you click on the photo icon on the screen you just see the pictur of the closed shutter.  Does anyone know how I can fix this or have had this happen to them,  Of course I am now out of the 3 months free phone support.  Thanking you in anticipation.

    Restart iPhone: Hold down the Sleep/Wake button and the home button together until the apple logo appears (ignore the ON/OFF slider) then let both buttons go and wait for phone to restart (no data will be lost).

  • Help with camera function on a 6350

    We just got this phone and are trying to use the camera function. When we go Menu > Media > Camera it says "Not Allowed" and we cannot use it. There is nothing in the manual about this.
    HELP!!!!!

    Well, initially you could try to do a reboot. Remove the battery for 5min, then restart your phone.
    Also please try to check if there are available updates for your phones.
    If you find my post helpful please click the green star on the left under the avatar. Thanks.

  • Camera function in Messages keeps crashing

    Hello,
    I have an iPhone 6+ 64gb iOS 8.02. I've had the phone for more than a week now and everything works great. Except for one thing. When I'm in Messages and click on the camera button on the left side to send a pic or video, the pictures are extremely slow to load and crash right after. I've restored my phone many times, hoping to resolve the problem but it's still there.
    I also ran a restore of my backup onto my iPhone 5 and the camera function in Messages works, but is just a little slow (which I think is normal since it's 2 years old). Therefore, I'm a bit inclined to believe it's my iPhone 6+?
    Also, not sure if this has anything to do with it. When I go into the App Store, it seems as the banners don't fit correctly. Is anyone else having the same problems?         

    I had this same issue.
    I traced my issue back to a bug in the "Speech" options under Settings > General > Accessibility.
    If you enable "Speak Screen," all kinds of bad things happen with the camera in Messages. When I disable "Speak Screen" everything is fine.
    I have reported this to Apple.
    iPhone 6+
    iOS 8.0.2

  • Can't use the camera function in my ipod touch 4s while updated to iOS 6.0

    I can't use the camera function in my ipod touch 4s while updated to iOS 6.0.
    There is all black screen when I turn on my camera. 
    I open the restriction setting already.
    thank you.

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:
    iOS: How to back up
    - Restore to factory settings/new iOS device.

  • Editing more than 4 clips using the multi-cam function. cs5.5

    How can I edit more than 4 clips at a time using the multi-cam function in 5.5?

    Ok, here's what I have so far...I managed to split up the video and edited both in the multi-camera view. Now I want to join those together so that I can use the multi-camera view to edit them together. Is there a way to do that? I tried nesting them both and laying them on the same timeline to use the multi-camera function, but now, I only get one view again. Is there something I'm doing wrong? Thanks for your help so far also. This is very interesting!

  • Multi Camera Function

    I use 6 cameras when shooting the local roller derby events. I currently use FCE and have to scale down the 6 video feeds to little boxes so they will all fit on the canvas, then choose which angle I am going to use, cut that section out of the time line, pick the next angle and so on and so forth. Squinting at tiny little boxes becomes quite tedious after a few hours. I have read in the FCE forum that FCP has a multi camera function. Can someone please explain exaclty how it works? $1200 is steep for a program, BUT if it saves my hours upon hours of sitting in front of my computer, it will be well worth it. I am getting ready to sign a contract for next year's bouts and would like to know if I should pony up the dough for FCP.

    Basically you can see tiny versions of your clips in the Viewer window,
    using 4, 9 or 16 views (with 6 cameras, you'd have to use 9), and you play
    the multiclip and click on the view you want. You can do this for a while,
    and when you stop, all the choices you made are shown as edits in the timeline.
    You can then adjust these edits with the roll tool, and adjust the sync
    using the slip tool.
    If you have rock solid timecode on your cameras the original syncing is easy;
    otherwise you have to set in or out points in the clips for sync.
    It's the quickest way to get a bunch of edits done in real-time while setting
    the pace to the music or the action. If you do a lot of this kind of work,
    it's definitely worth it.

  • Restore camera function

    How do I restore the camera function to my Iphone 4? I accidentally deleted the icon from the desktop.

    There is no "desktop" on an iPhone.
    It is not possible to delete the camera app.
    Either the camera app is in a folder or on another homescreen or it has been disabled in Settings > General > Restrictions.

  • Camera Function after installing 2.3.3

    Hi
    Installed 2.3.3. yesterday and have lost camera functionality. Image can be seen to be taken, but no image can be captured. Touch screen and normal all fail to capture an image. I have reset factory preferenes on camera but nothing. I also keen getting an error message explaining that the camera is but and i need to wait. Can anyone help?

    Hi Uliwooly, have reloaded the software and unfortunately this has not improved matters at all. I have also reset the settings in the applications menu as you described.
    Symptoms remain:
    When opening Camera App, image can be seen on the screen.
    Image cannot be captured, when using touch screen or normal capture options. In fact when pressing screen or capture button screen darkens, and all menu incons disappear.
    When changing functionality in capturing mode menu, I get the error message"Sorry, Activity Camera (in application camera) is not responding" it then gives me 2 choices "Force Close" or "Wait"
    Has anyone got any suggestions at all. STrangely I dont normally use the camera that often normally, but am on a family holiday and am missing the ability to capture my special moments.

  • Camera function - Shutter Sound

    Is it possible to turn off the shutter sound in the camera function on my Blackberry Curve 8310 and if so how?

    Nope, that is not an option within the native OS.
    However, there is an application called BerryAnnoying which will do just that.
    http://store.blackberrycool.com/product.asp?id=19977&n=BerryAnnoying
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

Maybe you are looking for

  • Web Analytics reports and not showing data

    Recently we are not seeing Web Analytics data on our sites in our SharePoint 2010 farm. Before we used to see the data. This is what we are seeing now "There is no data available for this report. Here are some possible reasons: (1) Web Analytics has

  • Open items in SD

    Hi I need to reconcile with unbilled sales orders / and billing plans with FI. Is there any report in SD that can I can just pull out that shows me the open values in SD thats are yet to be billed. thanks moonriver

  • Problem in BPEL Human task

    I am developing the BPEL process in jdeveloper11g. I used Human task for serial approvers. When I test the service I was able to see the Recive and Callback of human task. I want to Invoke partner link (used for DB adapter) whenever first approval ap

  • Idoc to Muliple file

    Hi All,   I have a scenario idoc to file but the catch is 2 file need to send one with idoc details and the other one just a constant to be sent. for this I hope we need to BPM using fork.   My question is can we avoid BPM and would it possible in re

  • Error in post goods issue

    hiiiiii         when i tried for post goods issue i am getting an error as "posting only possible in 2008/10 --2008/09 in compmany code"         i have checked in MMPVMMRVOMSY but still i am unable to solve my error.         plz let me know where r t