sketchucation logo sketchucation
    • Login
    1. Home
    2. MrDailyBlah
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    M
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 14
    • Groups 1

    MrDailyBlah

    @MrDailyBlah

    10
    Reputation
    1
    Profile views
    14
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    MrDailyBlah Unfollow Follow
    registered-users

    Latest posts made by MrDailyBlah

    • RE: SketchyPhysics - New Grip System for Cars ! !

      @ashscott said:

      So you're not getting the issues I described two posts ago.....?

      I seem to get it no matter how I run it (apparently the raytest issue was clashing with SU8 but I can't even get it working right in SU7)

      try reinstalling sketchup or SP or sumthing πŸ˜• ...

      posted in SketchyPhysics
      M
      MrDailyBlah
    • RE: SketchyPhysics - New Grip System for Cars ! !

      @ashscott said:

      But Raytest has a tendency to cause SU to flip out - know of a workaround or why I am having the symptoms described?

      uh... 😲 nooo...
      u'd better consult pros like Wacov.. πŸ˜•

      posted in SketchyPhysics
      M
      MrDailyBlah
    • RE: SketchyPhysics - New Grip System for Cars ! !

      @ashscott said:

      I've added a little complexity that is causing this script to crash SP when I try to run it.

      As far as I can tell it has something to do with the raytest function - potentailly related to the issue described on this thread: http://forums.sketchucation.com/viewtopic.php?f=180&t=30558

      I have tested it in SU7 as well but am getting the same issue - basically the model explodes, the POV zooms way out and all I can find left in the model is a bunch of endpoints (like on the end of a tapemeasure guide......can anyone shed some light?

      Ash

      that's right sir...
      i used raytest to find the point where the wheels touch the floor, then i teleport magnets to them to attract the wheels... πŸ€“

      posted in SketchyPhysics
      M
      MrDailyBlah
    • Tutorial: How to create physics joints in SP simulation

      Hi there..
      Now probably all of u guyz have used Sketchyphysics at some point, and created physics joints in them. πŸ˜„

      The problem though, is that sumtimes the joints become glitchy 😒 : they either become floppy or fall off completely... 😒 😠 not good...

      The solution to the problem is to create a joint while the simulation is running.

      Ever explored the scripts which make up Sketchyphysics? If so, u've probably seen the module "NewtonServer" sumwhere... πŸ˜• . this module is just about the kernel of the Sketchyphysics system. It creates nearly every physical feature of Sketchyphysics, from joints to forces to gravity and so on. πŸ€“

      We need one of its methods, which is "createJoint"...

      
      # this example creates a hinge joint
      parent={grp} # a grouped object that encases the joint
      child={grp} # a grouped object that is attached to the joint
      
      type="hinge"
      min=0
      max=0
      accel=0
      damp=0
      breakingForce=1000000
      limits=[min,max,accel,damp,0,0,breakingForce] # parameters for the joint
      
      xform=parent.transformation
      pinDir=xform.zaxis.to_a # the axis of the joint
      
      parentBody=DL;;PtrData.new(parent.get_attribute("SPOBJ","body",nil)) # converted parent body
      
      childBody=DL;;PtrData.new(child.get_attribute("SPOBJ","body",nil)) # converted child body
      
        jnt=NewtonServer.createJoint(type,xform.origin.to_a.pack("f*"),
                  pinDir.pack("f*"),
                  childBody,parentBody, 
                  limits.pack("f*") ) # the joint itself	
      
      
      

      Important: in general, all array objects need ".pack("f*")" after them, and all grouped bodies need to be converted into DL::PtrData (by using "DL::PtrData.new({grp}.get_attribute("SPOBJ","body",nil))" ) πŸ€“

      The created joint doesnt have the bugs normal joints have. (hopefully... πŸ˜† )

      Have fun "Sketchyphysic"ing (!) πŸ˜„ πŸ€“ πŸ€“ ❗ πŸ’š

      posted in SketchyPhysics
      M
      MrDailyBlah
    • RE: SketchyPhysics - New Grip System for Cars ! !

      @hobbnob said:

      I haven't had that problem in the 4 years I've been using sketchyphysics, you sure you've got your wheels geom and ontick interval set up correctly?

      sure as pants man.. ❓ ❗ 😲

      posted in SketchyPhysics
      M
      MrDailyBlah
    • RE: SketchyPhysics - New Grip System for Cars ! !

      @hobbnob said:

      Hehe not a bad idea, but you could just have put push([0,0,-1]) in the ontick field of the wheel, does exactly the same thing πŸ˜„

      (little extra note, if you want to have the vehicle turn on it's side/upside down and still have it work, then encase your steering block around the drive joint (either hinge or motor dependign on your preference) and they won't collapse)

      uh..well.. push([0,0,-1]) creates a violent vibration in the wheels.. so its not that simple.. 😞 ❗

      p.s. i looked in ControllerCommands.rb and found the push()method is the same as $sketchyPhysicsToolInstance.pushBody(), which creates the vibration i talked about... 😒

      posted in SketchyPhysics
      M
      MrDailyBlah
    • RE: Flames for fire place

      i created something similar in SketchyPhysics 3 (although 2d) by switching the texture every frame... πŸ€“

      a 2d fire... lol
      πŸ’š πŸ˜† πŸ’š πŸ˜† πŸ’š πŸ˜† πŸ’š πŸ˜† πŸ’š πŸ˜† πŸ’š πŸ˜†

      [flash=480,360:2mrvf6eu]http://www.youtube.com/v/fa7XopOzq7M[/flash:2mrvf6eu] πŸ˜†

      sorrie its not downloadable... 😳

      posted in SketchUp Tutorials
      M
      MrDailyBlah
    • RE: SketchyPhysics - New Grip System for Cars ! !

      @don east said:

      Where did you put this script?
      Don

      u need to put it in the "scripted" section of the Sketchyphysics UI (neither the "ontick" or "ontouch" section would work...)

      posted in SketchyPhysics
      M
      MrDailyBlah
    • SketchyPhysics - New Grip System for Cars ! !

      Ever built a sketchyphysics car? And theres no grip on the ground? Well never fear, 'cos MrDailyBlah is here....(!) 😍 (!)

      I recently fiddled around with the raytest function, and i thought i could incorporate it in to the sim...

      A floor in sketchyphysics is perfectly smooth...it doesnt create friction like a normal surface would. To create more grip, the most obvious solution is to apply negative thrust to the car's body or suspension, but this collapsed the wheel hinges. ❓ ❗ 😒

      I tried to use magnetism as a solution, and i found that if i could use the raytest function, i could find a point under each wheel on the floor, to each of which i can teleport a magnetic object, attracting the wheels to the floor and creating grip without collapsing the car... πŸ€“ πŸ˜„ πŸ‘

      That was it in a nutshell... here's the code i used -

      
      # paste the following into the floor
      onstart{
      # a way to simplify Sketchup.active_model.raytest
      def newRay(p,d)
      ray=Sketchup.active_model.raytest(p,d)
      return ray
      end
      }
      # then i copied the following script 2 each wheel
      ontick{
      t=[0,0,-1]
      ray1=newRay(position,t)
      ray2=newRay(ray1[0],t)
      s=@simulation.findBody("sphere...") # the magnetic object; theres a unique one 4 each wheel
      s.teleport ray2[0] if (ray2!=nil) and (s!=nil)
      }
      
      

      heres a demo of the script

      P.S. make sure u know how it works befor u copy it... ( πŸ˜• )

      posted in SketchyPhysics
      M
      MrDailyBlah
    • RE: Cursor Position To November92

      NewtonServer.magnetMove? what is NewtonServer? is it a module in SP or sumthing?

      posted in SketchyPhysics
      M
      MrDailyBlah