Camera rotation limits not right

I have a camera rotating left/right/up/down, I am trying to
limit the rotation to 150 degrees in any direction.
I have this code working for the left/right:
if gPanLeft then pCamera.rotate(0,1,0)
pCamera.transform.rotation.z = max(-150,
I'm using the same code for up/down (using the x axis), but
the camera stops about 50 degrees in the up direction and about 210
in the downwards direction.
I thought I might have a problem with the starting angle of
my camera (as saved from 3DS Max) and I have tried using different
angles to compensate, but they don't seem to do much. I have also
checked to see if my camera collision is stopping the rotation, but
it isn't.
Can anyone help?

I think the problem is that we can't rely on the camera's
rotation vector to
detect extents of movement, as the y axis can flip -180 if
the camera is
rotated a certain amount, this will screw up your max
rotation checking and
make the camera appear to jam.
I think if you work with seperate properties for each axis of
rotation, edit
and check against the properties rather than the camera's
transform, then
apply them to the camera rotation vector in one go this
should fix the
problem. Some pseudo code to give the idea...
property pCamera,pCamRotX,pCamRotY,pCamRotZ
on beginSprite
pCamera = sprite(the currentSpriteNum).camera
pCamRotX = 0
pCamRotY = 0
pCamRotZ = 0
end beginSprite
on exitFrame
if gPanLeft AND pCamRotY < 150 then
pCamRotY = pCamRotY + 1
end if
pCamera.transform.rotation =
end exitFrame
Hope this may help
Richard Smith

Similar Messages

  • My iphone 4 photo auto rotation was not functioning, might be accidentally locked as I can see a locked symbol with a circle with an arroe surrounding it at the top right angle , next to the power % indicator. Please advise how to unlock it.

    My iphone 4 photo/message auto rotation was not functioning, might be accidentally locked as I can see a locked symbol with a circle with an arroe surrounding it at the top right angle , next to the power % indicator. This function was working perfectly since day 1.
    Please advise how to unlock it.

    Swipe upwards from the bottom of the screen to open Control Center. You will then find the orientation lock in the top row, last icon on the right. White is on, black is off. Tap and turn it off. If you see the lock symbol, then orientation lock is on, and that is what is keeping it in the portrait mode.

  • Apple logo on new iPad Air appears sideways.  Rotation is not locked.  How do I turn it right-side up?

    The apple logo on my new iPad Air appears sideways.  Rotation is not locked.  How can I turn I right-side up?

    Hi chs2010,
    Welcome to Apple Support Communities.
    It sounds like the Apple logo isn't showing up in the correct orientation when you restart your iPad Air. The article below provides some general suggestions, like updating and restoring the device, which will help you find out if this is a hardware or software issue.
    iPad: Basic troubleshooting
    I hope this helps.

  • Camera Rotation Problem

    I have a problem with my camera rotation. I would like to have a button which allows me to rotate a camera in my scene using only x and y axe and with z axe blocked. My javascript is :
    var c = getAnnots3D(0)[0].context3D;
    var camera = c.scene.cameras.getByIndex(0);
    var camdir = camera.position.subtract(camera.targetPosition);
    camera.position.set(-Math.sin(3.14/6)*camdir.y+Math.cos(3.14/6)*camdir.x,Math.cos(3.14/6) *camdir.y+Math.sin(3.14/6)*camdir.x,camdir.z);
    Script works good for x and y axe , but unfortunatelly z axe moves too(kind of a wave, starts low goes up and ends down after Pi/2) . Even if I block it using a constant instead of camdir.z, it moves but javascripy debugger shows z value blocked.
    Any idea what I'm doing wrong ?
    Help appreciated

    Your math really doesn't make any sense to me.
    All those math.cos(..) calls are constant because you are only passing constants. i.e. Math.cos(3.14/6) will always be 0.866158094. So you are doing this:
    position.set(-.9y + .5x, .9x + .5y, z);
    I'm not really sure what this "button" is supposed to do. if you want it to prevent the camera from tilting up and down, you have to repeatedly prevent the camera from tilting using a TimerEventHandler.
    Also, you are taking the camera direction and using it to set it's position, this will keep moving the camera near the origin and will probably be unpredictable.
    So really, I'm not sure what you are trying to do. Let the camera rotate freely in only 2 of it's own axis? only 2 of the world axis? or orbit an object only on 2 axis? only let it move left and right, but prevent it from tilting up or down? ...
    I can help, but you need to be more specific.

  • Thinkpad Helix - Screen auto rotation does not work (Issue 3/3)

    I have installed a clean Windows 8.1 on the Helix and have several issues. Putting them into several threads so they can be answered independently.
    The first thing I did after installing the system (and critical Windows Updates) was running the Lenovo System Update tool and downloading everything.
    Screen rotation does not work. In “Device Manager” I can see “C5621 gw Mobile Broadband Geolocation Sensor” and “Hid Sensor Collection”. The HID one has an exclamation mark next to it. Are there some drivers I need to download to make this work. I did of course check if screen rotation is not locked – it is not (I did turn it on/off a couple of times, without any effect). Manual rotation (using display settings) works fine.
    Thank you in advance for any help,
    Go to Solution.

    Hi Lukasz,
    Try, in device manager, right click on HID Sensor Collection then uninstall. Reboot, and see if the driver is loaded properly, if not click on scan for hardware changes.
    Knowledge is of two kinds. We know a subject ourselves, or we know where we can find information on it.
    ThinkPad T510 4313-CTO Windows 8 x64 - Intel Core i7-620M - NVIDIA NVS 3100M - 8GB RAM - 240GB SSD- Intel Centrino Ultimate-N 6300 - Gobi 2000.
    ThinkPad Helix 3697-CTO Windows 8.1 x64 - Intel Core i7-3667U - Intel HD Graphics 4000 - 8GB RAM- 256GB SSD - Intel Centrino Advanced-N 6205 - Ericsson C5621gw

  • "Limits not Defined " error while saving IT0008 in sap hr

    Hi Experts
    While trying to Hiring an employee, infotype0008 showing Limits not defined error and not allowing to save the record. I checked table V_T510 and V_T510N. All the limits defined in right way. Please check and advice. I attached copy of screen shot for your reference.
    Prakash Bhave

    Hi Remi
    Thanks for your reply. As per your reply I followed procedure and it allowed me to save Basic Pay Infotype (0008)
    Thanks a ton.
    Prakash Bhave

  • I updated my iPod Touch to 6.0.1. after much prompting. Now my music is gone! (along with apps, photos and podcasts). After syncing a bunch of times some of it came back, but not all of it. How odd is that? How can I get my music back on it??

    I updated my iPod Touch to 6.0.1. -- after much prompting from iTunes. Now my music is GONE (along with apps, photos and podcasts). After syncing a bunch of times some of it came back, but not all of it. How odd is that? How can I get my music back?? I'm really bummed! Everything shows in iTunes, but it's not synching right. So glad I updated. NOT.

    Go to iTunea>Preferences>Devices and see if there is a backupright at the time you did the update. Then try restoring from that backup. If the apps are in your iTunes library, any app data will be restored to the iPod.
    When restoring from an iOS 4 (or later) backup, if the device had a passcode set, iTunes will ask if you want to set a passcode (and remind you that you had protected your device with a passcode). iTunes will not ask you to set a passcode when restoring from iOS 3.x and prior backups.
    Therefore, remembe the passcode that you enter this time.
    It appears that if you restore from a backup, that backup is not subseqyently overwritten by the next backup.

  • Adobe camera raw will not respond in bridge cs6?

    adobe camera raw does not respond in adobe bridge? I am trying to open Jpegs, which i have previously been able to do so by right clicking and opening in adobe camera raw. Now it is unresponsive.

    You are definitely in the wrong forum for Bridge CS6 and Adobe Camera Raw. You have posted in the Adobe Premiere Elements Forum (video editing focus).
    You probably want to be posting in the Photoshop Forum.
    My preliminary findings suggest possible workaround
    a. Open camera raw in Photoshop 5 or 5.5 and then open edited raw image in Bridge CS6
    b. There is a preferences route to check out.
    Not being a Photoshop user, this is a quick suggestion where you might start looking. This is apparently a known issue.
    The Photoshop users should be able to give you all the details and options you have for workarounds for now.
    Add On...Please repost in Photoshop Forum or wait for a moderator here to see your thread here and move it from here to there.

  • Adobe Photoshop CS6  Extended 3d Camera Rotation Timeline Issue

    This is driving me daffy, and maybe it's obvious, but I hope someone might have an answer. I'm trying to create a timeline wherein the camera rotates in a circle around a 3d Object that is located at the origin of the Ground Plane. I click 3d Camera in the Timeline to create my beginning keyframe, I drag the time slider to the end of the timeline, and I Rotate the camera view around the Z (vertical central)  axis of the ground plane. I have the caps lock on so that the ground plane stays perfectly level as I rotate.)  As I am rotating the 3d Camera, the entire scene appears to rotate around the Z axis at the origin of the ground plane, which is what I want the animation to look like, but this is not the scene that plays back. When I play back the scene by clicking the play button or dragging the time slider, it rotates off-axis around some other center of rotation, with my 3d object often rotating out of the scene. Am I doing something wrong? Any insight would be appreciated.
    J. Combs
    P.S. --I tried the technique both on an imported 3d object (a head) and on Photoshop's preset Hat object with the same results.

    Each camera keyframe will record the camera's location in world and its rotation about a pivot at that particular location, not the apparent pivot of when you were manipulating the view. You will not have recorded a circular camera path. The path will be straight lines between keyframes.
    If you really want to make life hell and do the animation in Photoshop, then record a keyframe at each 5 to 10 degrees of rotation of the camera while you manipulate the view. That'll create a polygonal path that quite closely approximates a circle.
    You could be tempted to keep the camera stationary and rotate Scene instead but the lights are outside of Scene so they would need to be rotated individually in order to create the illusion of only the camera moving.

  • No matter what I try, Camera Raw will not update from 8.3 to 8.4.1 in PS CC

    I've tried completely uninstalling Bridge and Photoshop CC and reinstalling and I'm still on Camera Raw 8.3.
    It just will not update.
    I also tried the link to manually install and it just says the patch is not applicable.
    Any ideas why even after completely removing and reinstalling both Bridge and Photoshop my Camera Raw will not update?

    When I replied to your post, I was replying to an original post that came in via my e-mail today at 2:30 and was the most recent thing in the ACR forum and had remained unanswered for 1.5 hours, so I decided to reply.  Had your post been put in a forum I subscribed to and happen to notice days ago, then I might have seen it, then, but didn't see it until this afternoon, and the e-mail version of your post only had the scant initial information, not the subsequent question and answer about your OS that you'd replied to on the other forum.  So as you say, I had not read the thread, because it was on a forum I didn't subscribe to.  So be shocked and perhaps awed as is necessary.  My treat.
    Second, I did make a typo when I said Win8/8/8.1 and it should have been Win7/8/8.1, which might have been deduced by the repeated 8, so you could have asked for clarification.
    Seeing as you're on Windows 7 which ACR 8.4 should be compatible with, one minor detail is that I see in the compatible Lightroom 5.4 requirements that it needs Windows 7 Service Pack 1, which would mean you'd want to be caught up on your Windows Updates, which I would assume you'd be.
    There are direct links to ACR 8.4(.1) on Jeff Tranberry's blog that are distinct for PS-CS6 and PS-CC so maybe that is what isn't right?
    Keeping Photoshop Up-To-Date
    You might check what version of PS-CC you have.  14.2.1 is the most current, and maybe that is prerequisite to ACR 8.4.1, I don't know. 
    If worse comes to worse, uninstall everything Adobe, then run the CS Cleaner then re-install CC Desktop and see what happens as you install PS-CC and it's updates.  It may need to be run several times.
    Once you're ready to retry your installs, you also might try to Quit CC Desktop and run it As Administrator in case there is a permissions issue.
    The CS Cleaner can be found, here:
    Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6

  • HT200197 the colour on my apple tv is not right. itsshowing every thing in a grean and purple colour. i have restarted apple tv and changed the hdmi cable but the problem stiil persists

    the colour on my apple tv is not right. the only colours are black white green and purple. i have retatrted my apple tv and chenged the HDMI cable all with no success.
    any suggestions of what else i can try?

    Welcome to the Apple Community.
    If your problem persists get yourself a micro USB cable (sold separately), you can restore your Apple TV from iTunes:
    Remove ALL cables from Apple TV. (if you don't you will not see Apple TV in the iTunes Source list)
    Connect the micro USB cable to the Apple TV and to your computer.
    Reconnect the power cable (only for Apple TV 3)
    Open iTunes.
    Select your Apple TV in the Devices list, and then click Restore.
    (You may already have a micro USB cable if you have a camera or other digital device)
    If this doesn't help, try it on another TV, if the problem persists you possibly have a failed unit.

  • HT5858 In the control center I can change the mute or the rotation but not both.  How do I fix this.  In settings I can not uncheck both the mute and rotation lock.

    In the control center I can change the mute or the rotation but not both.  In the settings area therefore I can't uncheck the mute and rotation settings at the same time.

    Check your settings. The iPads have a small switch on the right edge. It can be used as a rotation lock to keep the screen from automatically reorienting itself as you move around, but you need to have the tablet’s settings configured properly. That same switch, right above the volume buttons, can also be set to function instead as a mute button to silence certain types of audio.
    If the switch is set to work as a mute button, you can change its purpose to “screen-rotation lock” by tapping the Settings icon on the home screen. On the Settings screen, tap General on the left side, and on the right side of the screen flick down to “Use Side Switch to.” Tap to select Lock Rotation or Mute to set the button’s function. Even if you set the side switch for your preferred use, you can still mute the Mini or lock the screen. Just double-click the Home button, and when the panel of apps appears along the bottom edge of the screen, flick the row from left to right with your finger. Tap the icon on the far left side of the row to either lock the iPad’s screen or mute the iPad’s alerts, notifications and sound effects. Music, podcasts and video are not muted unless you turn the volume all the way down.
     Cheers, Tom

  • X6 Camera Rotation on v21.0.004

    I've recently made a CFW for the X6.  After installing, everything works really well except the camera controls do not rotate.  I've checked the sensor settings and rotation is enabled under turning.  In the camera settings, auto-rotate controls is enabled.
    I thought it may be something to do with the CFW so I flashed with the official firmware and the same thing happened.
    Has this feature been disabled on the latest firmware?
    Just to be clear, i'm not having a problem with screen rotation...that works very well, it's just affected the camera.

    What do you mean by Camera Rotation ? the display on the screen will remain SAME in both settings (Screen rotation - ON / OFF). The difference will be seen when you see the images in the Gallery or when you copy the photos on PC..    (If you select NO then you will have to manually rotate the photo by 90Degrees to see it correctly)
    --------------------------------------------------​--------------------------------------------------​--------------------------------------------------​--If you find this helpful, pl. hit the White Star in Green Box...

  • Rotated photos not showing up in slideshow

    Hello all -
    I'm making a photo slideshow with iDVD and photos imported from iPhoto. The photos taking from the camera with the camera rotated 90 degrees are showing up fine as thumbnails in the iDVD menus, but not displaying at all in the slideshow when I run it. It shows the comments and title text but the photo is blacked out. Again, it is only the photos rotated not the standard ones. Any idea?
    I'm running 10.4.7 with iLife 06.
    - Greg

    Doesn't show up in the interface at all.  I only realized they were missing when I checked my iPhone pictures against iPhoto and realized that there were pictures missing.  I even ran the iPhoto database rebuild and some of the other diagnostics that suggested they might find these type of situations.  It actually found a few but I still have the 300 or so I reference above. Any idea what might be going on?

  • I just broke my ipad. I've taken really good care of it and had it since the third gen came out (bought it right away) the screen is cracked from the bottom right corner and im wondering if i can replace it for free or even at all please help :(

    I've taken really good care of it and had it since the third gen came out (bought it right away) the screen is cracked from the bottom right corner and im wondering if i can replace it for free or even at all please help

    You can replace it, but not for free.
    iPad mini: $219
    iPad 2 or earlier, iPad mini Retina display: $249
    iPad 3rd generation or later: $299

Maybe you are looking for

  • Performance of ABAP query program

    Hi All, A custom program AQNWZ_TALAT=====TCS_AP_ITEMS== is taking lot of time running. And when checked the cost of the select statement is very high. I guessed it must be some custom abap query. Correct me if I am wrong. Also please let me know how

  • Data Merge questions

    We are using MS Mail Merge to populate existing forms. We have 250+ different MS Word .docx forms that have different information in different places. We are serving the mail merge data from a database throught a VB.Net program and it's working well.

  • Logical name to physical file mapping

    We want to have logical URLs for images (or other file types). We do not want to expose physical location where the files are stored to the user. Other web servers have APIs for this (NSAPI and MSAPI have provision for this). I was wonderinf if someo

  • Remove admin requirements for user font installation..

    I have been struggling with a solution to this issue. My web/design teams are constantly installing font packages on their windows 7. However, I cannot find a way to allow them to install fonts with their local accounts without giving them admin righ

  • Acrobat will not register on Windows 8.1 computer

    I have installed Acrobat 8 Professional on a new Windows 8.1 computer. It works, but every time I open the program it says it was not registered properly. If I ignore the warning the program still works, but I have a plug-in that I use that I have to