• Login
sketchucation logo sketchucation
  • Login
๐Ÿค‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Camera help

Scheduled Pinned Locked Moved SketchyPhysics
8 Posts 2 Posters 2.0k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    Barack
    last edited by 3 Oct 2010, 09:43

    I need to make the camera follow a ball for a simple game. But i don't know how to code the object so that it will. Could someone please help me?

    I'm a Sketchup Free user, nothing else. 3DS is way too expensive, and Pro, ditto. What else do you expect?

    UPDATE: I have some blender knowledge, that is why this signature is edited.

    1 Reply Last reply Reply Quote 0
    • H Offline
      hpnisse
      last edited by 3 Oct 2010, 11:07

      Hey!
      If you dowload SketchyPhysics 3.1 http://sketchyphysics.googlecode.com/files/SetupSketchyPhysics3.1-Sep27.exe that CPhillips released a few days ago at this forum, http://forums.sketchucation.com/viewtopic.php?f=61&t=31262&start=0.

      Then you can use this script in an objects script-field:

      
      ontick{
         camera.set(camera.eye,transformation.origin,[0,0,1])
      }
      
      

      This will follow the object that you need.
      /hpnisse (script is from CPhilips, that created SketchyPhysics 3.1)

      ` /hpnisse`
      ` Windows 7 U -Sketchup 8 -SketchyPhysics 3.2-Dec2 - from Sweden`

      1 Reply Last reply Reply Quote 0
      • B Offline
        Barack
        last edited by 4 Oct 2010, 06:53

        @hpnisse said:

        Hey!
        If you dowload SketchyPhysics 3.1 http://sketchyphysics.googlecode.com/files/SetupSketchyPhysics3.1-Sep27.exe that CPhillips released a few days ago at this forum, http://forums.sketchucation.com/viewtopic.php?f=61&t=31262&start=0.

        Then you can use this script in an objects script-field:

        
        > ontick{
        >    camera.set(camera.eye,transformation.origin,[0,0,1])
        > }
        > 
        

        This will follow the object that you need.
        /hpnisse (script is from CPhilips, that created SketchyPhysics 3.1)

        It tracks an object, not follows it. I need the object to always be followed from overhead and the code to be ontick compatible, not scripted compatible.

        UPDATE: I HAVE DOWNLOADED SP3.1.

        I'm a Sketchup Free user, nothing else. 3DS is way too expensive, and Pro, ditto. What else do you expect?

        UPDATE: I have some blender knowledge, that is why this signature is edited.

        1 Reply Last reply Reply Quote 0
        • H Offline
          hpnisse
          last edited by 4 Oct 2010, 15:07

          Okay! Sorry ๐Ÿ˜„

          If you want it to follow a object, then

          1. Add a scene.
          2. Open Scene Manager
          3. Add camera follow NAME (NAME is the name of the object you want to follow).
            (If you want to TRACKa object just write camera track NAME insted.)

          If you don't know how to name objects:

          1. Select a group/component.
          2. RightClick on that.
          3. Click: Entity Info
          4. There you have a box that is called Name:.
          5. Just type in anything.

          Hope this is what you searching for.

          /hpnisse

          ` /hpnisse`
          ` Windows 7 U -Sketchup 8 -SketchyPhysics 3.2-Dec2 - from Sweden`

          1 Reply Last reply Reply Quote 0
          • B Offline
            Barack
            last edited by 13 Nov 2010, 04:12

            Thanks!

            BTW i can use a scripted field, i just had rc1 until 3.1.

            I'm a Sketchup Free user, nothing else. 3DS is way too expensive, and Pro, ditto. What else do you expect?

            UPDATE: I have some blender knowledge, that is why this signature is edited.

            1 Reply Last reply Reply Quote 0
            • H Offline
              hpnisse
              last edited by 24 Nov 2010, 15:50

              Hello!
              The text Camera track NAME should be in the Scene Description.

              And if you want both Track and Follow in the same scene, you need to type in.
              Camera track NAME. Camera follow NAME
              in the Scene Description. (you can have diffrent name on track and follow objects)

              I've tested it right now cause I didn't remember, but I got it to work.

              Hope you get it to work to.

              /hpnisse

              ` /hpnisse`
              ` Windows 7 U -Sketchup 8 -SketchyPhysics 3.2-Dec2 - from Sweden`

              1 Reply Last reply Reply Quote 0
              • H Offline
                hpnisse
                last edited by 24 Nov 2010, 17:50

                Hello again!

                I had done a .skp file now that simulates this really good, I think. So if you cant run the simulation (track/follow) correct, then I don't know what it is. โ“
                It's a very basic model, with two box with name on, Track and Follow. Right below the names there is letters, that is how to move the box right/left. (WASD keys are used)

                Here is the file:
                TrackFollowTest.skp

                /hpnisse

                ` /hpnisse`
                ` Windows 7 U -Sketchup 8 -SketchyPhysics 3.2-Dec2 - from Sweden`

                1 Reply Last reply Reply Quote 0
                • H Offline
                  hpnisse
                  last edited by 25 Nov 2010, 17:28

                  Really good that you got it to work! ๐Ÿ˜„


                  Pre-release SP 3.2 if from the topic
                  http://forums.sketchucation.com/viewtopic.php?f=61&t=32200
                  and the direct downloadlink to SP3.2 (windows installer):
                  http://sketchyphysics.googlecode.com/files/SetupSketchyPhysics3.2-Nov1.exe
                  This version can support midi music or something, watch that topic. The files that was uploaded there was awesome!

                  /hpnisse

                  ` /hpnisse`
                  ` Windows 7 U -Sketchup 8 -SketchyPhysics 3.2-Dec2 - from Sweden`

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post
                  Buy SketchPlus
                  Buy SUbD
                  Buy WrapR
                  Buy eBook
                  Buy Modelur
                  Buy Vertex Tools
                  Buy SketchCuisine
                  Buy FormFonts

                  Advertisement