J
Janna

  • Jan 23, 2024
  • Joined Oct 5, 2023
  • I think I can see that there are changes for DisableTranslations that I don't have in my version, so I will need to use the one you provided, are you planning to include this code in the latest TCP update? Thanks 🙂

    • Hi,
      Could I ask to clarify one of camera parameters in Follow -> Distance from Target. In my own project I was having issue that camera would not move after the object at all and after little experimenting I found that the value of Distance from Target was 0.05 but if I set it to 0 the camera started to move. I went into the demo scene that came with Touch Pro Perspective_And_TopDown_Demo_Mobile and changed the 0 to 0.05 here and I found that if I click on Cube(4) which has focus true and follow true, it would start to follow but very soon camera stops following, I think I had similar issue in my project. Could you clarify if this is expected behaviour and how to use this parameter? Thank you so much!

      • Hi,
        I am integrating camera into our scene which is is a room-like setting and I would like the camera to be able to move all around the room boundaries which is basically the box. I want to have one of the camera modes that would use free camera to move all round the room but not get out of bounds. With another mode (orbit mode) I can just limit the zoom to/from the avatar to avoid getting out of the room. But with free camera I wanted to use the boundaries that com with Touch Camera but it seems only work with 2d shape, is it possible to extend it to 3d shape like box? Thanks!

        • Hi Anthony,
          Thank you very much! I just tried it and it is looking really good, will be integrating into our project. I have noticed that in this package you sent there are lots of new changes, from the look on Camera Orbit script I just need that or do I need any changes that came in the updated project you sent?

          • Thanks! Have a good vacation as well! 🙂

            • Thank yeah I see what you mean, if object is very far I do want to focus and zoom but if object is close enough I don't camera to move closer or further, so I think I will have to implement a bit of extra logic using the functions you suggested, thanks!

              Actually what I want to happen ideally is to be able to zoom in and out of object without losing the focus (we have another thread discussing it) but I have not worked out acceptable solution yet (See our discussion in the OrbitDemo thread), so this is my intermediate solution right now

              • Hi, I am using Free Camera and trying to focus on the object by attaching collider and using focus
                through OnSelected(TouchSelect select) from FocusOnClick.cs . When focusing camera always moves to a certain distance from the object which seems to be controlled by "Focus Radius Multiplier" or "Focus Distance Multiplier". I would like to make so that when I focus on the object camera ideally stays at the same distance that we were or as close to this distance as possible instead of always moving too the same distance from the object. Would you be able to point me how to do that?

                On the off-topic what does "Allow Yoffset" meant to do?
                Thanks!

                • I have a couple of questions regarding getting the orbit camera to work 1 )In your OrbitDemo if we try to pan the scene pans for a split of the second and then gets back into the original position, is it possible to disable panning at all? So we can only have zoom and rotate in the orbit mode? To avoid glitchy looking behaviour

                  2) In the same OrbitDemo if I move the Sphere up along Y direction the camera is no longer focusing on the Sphere but keeps focusing below. I have attached the photo. I have tried using Free Camera but got the same behaviour. Is there a way to adjust the camera so it is always looking at the centre of the target object? I thought this is what the code in OrbitDemo was doing but seems the camera is not going up.
                  https://ibb.co/kG49HZZ

                  I want to add that I tried to modify the code like this:
                  //cam.MoveCameraToInstant(targetObj.position.SetY(0));
                  cam.MoveCameraToInstant(targetObj.position);
                  It does help to get camera to the same height as the Sphere but the orbiting seems glitchy.

                  • Anthony Thanks! Is there a way to detect that we started to "pan" so I can automatically stop focusing and if user double clicks/start focusing on the object again to bring it back into "orbit mode" until another panning happens? Thanks!

                    • Thanks! It is set to 0.01 but I can see now when I hit play button it gets reset to 1 automatically, then if I put 0.01 there as I am in play mode it does fix the problem.

                      • Thanks Anthony, I just tried the demo and this is exactly what I want except I still want to be able to do panning, when panning happens camera would lose the focus of the object and continue focusing on the floor until I click to refocus on the object. I am going to look how to combine these two together, if you have any tips it would be great. I have noticed that you have used perspective camera instead of free camera in the orbit demo, I thought that perspective camera could be somewhat problematic if we end up not looking down on the floor plane?

                        • Hi Anthony,
                          I made a video where I am running Free Camera Demo and I changes min distance to 1 (to be able to get closer to the RoundedCube). See how the camera transform changes and camera jumps to a different position?
                          https://youtu.be/1uCNfB95gR4

                          Regards,
                          Janna

                          • Hi Anthony,
                            Please see the attached video https://youtube.com/shorts/3ZZtVaJsLK8?feature=share
                            See how first when model is focused camera is orbiting around it, then I zoom into it few times and try to rotated around it now it rotated around some different point. I am trying to achieve orbit camera behaviour so I want it to keep rotating around the model just like it does when I focus on the model (before any zooming).

                            Thank you
                            Janna

                            • Thank I found that the rotation is better with the free camera, but there is still jerkiness with zoom and pan. Thanks!

                              • Hi Anthony,
                                Sorry to bombard you with questions, but I am having a little issue with Free camera. I am trying to zoom pretty close on the model but if I set Camera min Zoom to 1 (instead of 3 for example) and zoom the camera ends up in very different position. You can try it in the Free Camera demo just change min/max distance to 1 instead of 3. Please let me know if there is limitation on this or is it a bug? Thanks!

                                • Hi Anthony, I have a question regarding the zoom, I am using free camera and click on the object to focus and then the camera is orbiting around it as desired. But if I zoom in or out camera is no longer orbiting around the object unless I click to focus again. Do you know if there is an easy way to simulate orbit like camera, so I can zoom in and out and the camera will still orbit around the object? Thank you

                                  • Thanks, do you mean that there is a bug in the code in respect to touch control, the issue I have described with removing and placing fingers on the screen? Or the pan with two fingers ? The pan works much better with fingers spread apart but gets very jerky with two fingers close to each other . My main issue is with jerkiness when i remove and place fingers back on the screen. I found there is less issue if you try to place fingers exactly same spot but if I place fingers back on different part of the screen camera can jerk and few times even move really far but usually just small but noticeable jerk. Do you think there is a bug there ? Thanks!

                                    • Btw I tried spreading fingers much more for panning and it seems to improve the smoothness of the panning a lot. But I can still see some jerkiness like the scenario with rotation (keeping fingers on vs taking them off and then putting back on the screen). In the editor everything works pretty smooth!

                                      • Hi,
                                        I am testing the perspective camera on Iphone and I found that if I am keeping my fingers attached to the screen I can do rotation pretty smoothly and if I stop rotating but keep fingers pressed on the screen I can resume roatation still from the same point without any jerkines. But if I rotated, then remove the fingers, then try rotating again I almost always get jerky camera move, like it ends up in different position first frame then start rotating smoothly from there, this make it feel more jerky overall. Do you have any idea why this happens and any ways to make it not jump to a different position? Also panning seems a bit jerking overall I am panning using two fingers, is this correct? It feels to me that when I am trying to pan it is fighting with rotation or zoom, but I can never get a nice clean pan. Maybe I am using wrong finger gesture? Panning has the same problem that rotation has, when I put fingers back on the screen the camera can end up in very different position making it jerk actually much more noticeable than rotation. I am wondering if I might be not using this correctly? Thanks