• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

Sketchy Physics help :O

Scheduled Pinned Locked Moved SketchyPhysics
9 Posts 5 Posters 10.5k Views
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.
  • E Offline
    enard
    last edited by 22 Nov 2011, 14:20

    Hello.. just a quick question... sorry im fairly new to sketchy physics.
    Every time I try to name the "controller" it gives me an error that I dont know what to do about, and then
    it ends up not even renaming the part. 😕 😕
    Any help would be appreciated, Thanks!
    the error goes as such:

                                     Formula doesn`t compile:
                                     "the name I put in for controller"
                                     "A list of codes an so on"
    
    1 Reply Last reply Reply Quote 0
    • D Offline
      DanYHKim
      last edited by 23 Nov 2011, 03:09

      If you're renaming the controller through the (forget what it's called. The UI button on the toolbar), you can't delete the entire name given in the dialog box. You can only change the name that is inside brackets and quote marks:

      controllername1234("controllername1234")
      becomes
      controllername1234("NewNameForControl")

      If I misunderstood you, please forgive me.

      1 Reply Last reply Reply Quote 0
      • E Offline
        enard
        last edited by 28 Nov 2011, 10:32

        @danyhkim said:

        If you're renaming the controller through the (forget what it's called. The UI button on the toolbar), you can't delete the entire name given in the dialog box. You can only change the name that is inside brackets and quote marks:

        controllername1234("controllername1234")
        becomes
        controllername1234("NewNameForControl")

        If I misunderstood you, please forgive me.

        well when you select a hinge for example, and you open the UI(SketchyPhysics Inspector) the "controller" box is empty, it is highlited in blue though but when i enter a name then for the first time, thats when it gives me that error! kinda confused here lolz...

        1 Reply Last reply Reply Quote 0
        • D Offline
          DanYHKim
          last edited by 28 Nov 2011, 23:19

          AAahhhh! The hinge joint has no controller, since it does not actually have any power. You want a "servo" joint, which is designed to be rotated around one complete turn. If you want it to spin, use a "motor".

          Similarly, a slider joint probably has no controller, while a piston does.

          1 Reply Last reply Reply Quote 0
          • E Offline
            enard
            last edited by 30 Nov 2011, 06:07

            @danyhkim said:

            AAahhhh! The hinge joint has no controller, since it does not actually have any power. You want a "servo" joint, which is designed to be rotated around one complete turn. If you want it to spin, use a "motor".

            Similarly, a slider joint probably has no controller, while a piston does.

            unforunately it gives me the exact same error on the servos or motors or anything 😲
            i dont know if it might be cause i need a newer version of sketchy?
            i got sketchup 7 with sketchy 3.....

            1 Reply Last reply Reply Quote 0
            • H Offline
              hpnisse
              last edited by 1 Dec 2011, 19:43

              Hello!
              You can do the controller-thing in diffrent ways:
              Write this in the controller field.

              slider("NAMEofSLIDER")
              

              When you press play there will be a slider in a box, from value 0 to 1, (it will start on 0.5)

              key("SOMEkey")
              

              If you change "SOMEkey" to "W" for example, then when you press "W" it will be the same as the slider put to 1 (one)

              getVar("SomeText")
              

              This is used when you will programming the model to do diffrent stuffs, it´s a little more difficult to explain.

              hope this will work it out for you!

              /hpnisse

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

              1 Reply Last reply Reply Quote 0
              • T Offline
                tspco
                last edited by 2 Dec 2011, 01:32

                hpnisse, I have a question for you, well maybe more than that.
                I have be using sp for about a month, I managed to make things work using examples I have found online, but nothing definitive.
                My first question, I have an elevator in a model it is set for 132" and -132" or something like that. When I start the animation the slider goes to 0.5, as with other silder operated stuff. When I start the animation, the elevator moves to halfway up, so I have to use the slider to move it back down, I would prefer, that it stayed down until I wanted it to move. Same thing for a ramp on a vehicle, I want the ramp to stay in the "up", position until I wanted to lower it. How do I make this happen? or can I make this happen?

                SU make 2017, /Twilight Render Hobby
                Windows 10,64 bit,16GB ram, quad core Athlon 3.6 gHz proc. Anything else you want to know, ask me.

                1 Reply Last reply Reply Quote 0
                • H Offline
                  hpnisse
                  last edited by 2 Dec 2011, 16:40

                  Hello!!

                  I don´t know really how to do that fully functional.
                  But you can change so the value always start at 0 (zero), but the slider will be in the middle as always.

                  **Go to this folder that contain the physics files: Standard: "C:\Program Files (x86)\Google\Google SketchUp 8\Plugins\SketchyPhysics3"
                  Then open the "ControllerCommands.rb" file with a text editor or something like that! (ex. notepad in Windows)
                  Scroll down to line "11", probably you don´t have to scroll.

                  The line: def slider(sname,defaultValue=0.5,min=0.0,max=1.0)#command#
                  Change the line to: def slider(sname,defaultValue=0.0,min=0.0,max=1.0)#command#

                  Then save and restart Sketchup!
                  When you create a slider or motor or anything at all right now, with a slider, and then start it will show 0.0 and nothing will move.
                  !BUT the slider itself will be at the middle of the line! Don´t touch it yet!
                  Press pause and pull down the sliders to zero, then it will work!**

                  /hope this will solve the problem, otherwise, I recommend that you learn to script with "RUBY".
                  Perhaps we can help you with the basics, if I get time! Otherwise, I recommend this website!

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

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    stefanocarloni
                    last edited by 1 Dec 2014, 23:51

                    I have the same problem! 😞

                    The dialog box is blue, and I can't write anything, it says me: "Script Error:
                    uninitialized constant MSketchyPhysics3::ControllerContext::Main".

                    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