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

SketchyPhysics 3x June 27 version.

Scheduled Pinned Locked Moved SketchyPhysics
95 Posts 12 Posters 23.0k Views 12 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.
  • J Offline
    JaViXP
    last edited by 6 Sept 2009, 13:44

    Same for me.

    "Giving up is way harder than trying"
    JaViXP's Rendering

    1 Reply Last reply Reply Quote 0
    • W Offline
      Wacov
      last edited by 6 Sept 2009, 15:02

      It works for me, just not in any events.

      http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

      1 Reply Last reply Reply Quote 0
      • C Offline
        CPhillips
        last edited by 12 Sept 2009, 04:46

        @wacov said:

        It works for me, just not in any events.

        Not sure I understand. Can you post a model that fails and I will take a look.

        1 Reply Last reply Reply Quote 0
        • P Offline
          Physicsguy1
          last edited by 12 Sept 2009, 05:36

          BTW,(this may be a stupid question), but is there a way around the camera 'bending' situation where the camera eye overshots to some other point3D? I cant get any reliable camera systems...

          1 Reply Last reply Reply Quote 0
          • W Offline
            Wacov
            last edited by 12 Sept 2009, 11:01

            @cphillips said:

            @wacov said:

            It works for me, just not in any events.

            Not sure I understand. Can you post a model that fails and I will take a look.

            In Jun 27, putting your code inside a normal event (ontick{...}) crashes. It seems to work in the SVN version, though 😕

            http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

            1 Reply Last reply Reply Quote 0
            • M Offline
              mariocha
              last edited by 22 Oct 2009, 02:11

              Hi, just to share 2 small animations done with SkPh-3.
              One is quite amusing, showing Emitter, Thruster and magnet
              http://www.youtube.com/watch?v=ea5KeZ7Turg
              the other shows pseudo-virus
              http://www.youtube.com/watch?v=Yb_D__3m_0w

              %(#008000)[Mario C.
              Every rule has exceptions, but some.]

              1 Reply Last reply Reply Quote 0
              • M Offline
                mariocha
                last edited by 29 Oct 2009, 01:03

                @wacov said:

                Got cloth smoothing working, and made it easier to change the scripting (everything's in the floor).

                Ok I give up. Wacov, I just cannot see how this works. I have tried a few times. Refreshed my SkPh knowledge. Had fun with the new features.
                But your cloths are a vast mystery to me.
                The SkPh UI shows nothing.
                Is it PC only ? Scripting only ?

                %(#008000)[Mario C.
                Every rule has exceptions, but some.]

                1 Reply Last reply Reply Quote 0
                • W Offline
                  Wacov
                  last edited by 29 Oct 2009, 11:17

                  Basically, there's a physics object at the vertices of each panel of cloth. What you see in the simulation is Sketch Up geometry, which is created at the beginning of the sim, and modified in real-time; the main script is in the floor's scripted field, which creates a command used in the hidden physics objects.

                  http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

                  1 Reply Last reply Reply Quote 0
                  • J Offline
                    JeremyGBertin
                    last edited by 30 Nov 2009, 18:20

                    Hello Everyone, new member here.

                    Can anyone point me to a working example using the 'UnTouch' script functionality? I've played around with it, but can't quite seem to get it to work. I apologize if this has long since been covered somewhere, but I can't seem to find any examples. Thanks.

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      Davidfi1
                      last edited by 30 Nov 2009, 18:31

                      Did you mean OnTouch?

                      http://forums.sketchucation.com/download/file.php?mode=view&id=38286&sid=dd6f1c8a118406fd16177924a97f2a1a


                      OnTouch

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        JeremyGBertin
                        last edited by 30 Nov 2009, 19:34

                        No, I was not referring to the onTouch which is in the UI, but rather the opposite signal for when two objects stop touching.

                        Looking through the ruby code there seem to be events for onTouch, onTouching, and onUnTouch and I would like to know whether these are accessible for use. I am specifically looking for an example making use of an event which can fire code when two objects stop touching.

                        The effect I am trying to achieve it to set a variable when two objects come into contact, and clear the variable only when the objects move apart. Thanks!

                        1 Reply Last reply Reply Quote 0
                        • W Offline
                          Wacov
                          last edited by 30 Nov 2009, 20:40

                          Basically, you use:

                          ontouch{
                             #your code here
                             #code
                             #code
                             #more code
                             #etc
                          }
                          

                          In the scripted field. The code you put between the brackets will be executed, in the case of ontouch, upon every collision with another object. ontick{...}, onuntouch{...}, and ontouching{...} work in basically the same way, with ontick executed every frame, onuntouch whenever the object stops colliding, and ontouching every frame the object is colliding with another. With any of the the touch events, you can also access the object being collided with, the exact point3d of the collision, and the impact speed of the collision, using:

                          ontouch{|toucher,speed,pos|
                             #code
                          }
                          

                          You can then use them as variables in your event code.

                          http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

                          1 Reply Last reply Reply Quote 0
                          • J Offline
                            JeremyGBertin
                            last edited by 30 Nov 2009, 22:20

                            Thanks Wacov. Much appreciated.

                            1 Reply Last reply Reply Quote 0
                            • H Offline
                              hpnisse
                              last edited by 1 Dec 2009, 17:27

                              Hello!
                              When I try the "ontouch" in script-field event it will not work:S

                              Ex. I have a "button" (box), and when I push that button it touch another box with the script (easy one, see below) the physics engine freeze and I need to restart the physics-simulator.

                              Here is the simple code I use:

                              
                              ontouch{
                                 setVar("var1",1)
                              }
                              
                              

                              Why does the physics-simulator freeze?
                              And will this script set the "var1" to "0" (zero) when I relase the button?

                              Thank´s for help.
                              /hpnisse

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

                              1 Reply Last reply Reply Quote 0
                              • W Offline
                                Wacov
                                last edited by 1 Dec 2009, 19:44

                                The commands from RC1 no longer work in the scripted field, inluding get/setVar. The new variables are:

                                @var = 1

                                For a local (this group only) variable, retrieve it with:

                                @var

                                And:

                                @@var = 1

                                For a global (acessible from all groups) variable. Retrieve with:

                                @@var

                                http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

                                1 Reply Last reply Reply Quote 0
                                • J Offline
                                  JeremyGBertin
                                  last edited by 2 Dec 2009, 03:37

                                  Does anyone know of a way to allow for a Servo joint to rotate multiple revolutions?

                                  It seems like the maximum workable range for the Servo joints are 360 Degrees (2*pi radians) symmetrical about the starting angle, and when exceeded the joint starts to endlessly spin around. I am looking to achieve multiple revolutions while still maintaining angular position control. Any ideas would be welcome. Thanks!

                                  1 Reply Last reply Reply Quote 0
                                  • W Offline
                                    Wacov
                                    last edited by 2 Dec 2009, 06:10

                                    The only way I know is to use multiple, stacked servos (i.e. one group ontop of the other, with the same controller for both joints)

                                    http://sketchup.google.com/3dwarehouse/cldetails?mid=3096a836877fb9af6cd8ad826e9017b8&prevstart=0

                                    1 Reply Last reply Reply Quote 0
                                    • J Offline
                                      JeremyGBertin
                                      last edited by 6 Dec 2009, 04:55

                                      @jeremygbertin said:

                                      Does anyone know of a way to allow for a Servo joint to rotate multiple revolutions?

                                      It seems like the maximum workable range for the Servo joints are 360 Degrees (2*pi radians) symmetrical about the starting angle, and when exceeded the joint starts to endlessly spin around. I am looking to achieve multiple revolutions while still maintaining angular position control. Any ideas would be welcome. Thanks!

                                      I've still been working to find a way to create exact position control over multiple revolutions. I've been experimenting with an alternative method involving linking a Gyro to a Hinge and specifying gyro X-Y vector coordinates (for the plane orthogonal to the hinge axis) to set the angle of my object attached to the hinge.

                                      This method works fine for setting the angle of the hinge initially, but for some reason it seems like the Gyro is not able to be dynamically controlled while the simulation is running...? In the Controller field I have tried using variables, the 'slider' control, and key presses, but I can not figure out how to force the Gyro to be updated.

                                      Any ideas? Thanks.

                                      1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        Swatpup93
                                        last edited by 23 Dec 2009, 19:52

                                        Is there any scripts to put sound in SP 3X?

                                        1 Reply Last reply Reply Quote 0
                                        • H Offline
                                          hpnisse
                                          last edited by 24 Aug 2010, 14:44

                                          I can use the "@var" and "@@var" insted of "getVar..." and "setVar...", but I can't use the "onTouch{????}" funcion in the "Scripted" field.

                                          But the "@var" is pretty good, its shorter than "getVar". 😄

                                          /hpnisse

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

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

                                          Advertisement