SketchyPhysics 3x June 27 version.
-
-
Me too! Self connecting joints are a feature I have been trying to achieve since version 1. I HATE the JCT. Its hard to explain, tedious to use and is the reason you cant copy jointed objects. Its THE major reason I started SPIV. So, I am really glad it turns out to be possible in SP3.
-
Here is an example of a very simple camera system.
The first example puts the camera eye at the position of the sphere and looking at [0,0,0].
The second example finds the cone in the scene and looks at that. Note you can drag the cone and the camera will follow.
The @simulation.camera.set commands parameters are location of the eye, the target and the "up" direction.
The camera is the same as the camera in the Sketchup API:
http://code.google.com/apis/sketchup/docs/ourdoc/camera.html
-
Now we can create multi-roll games!
-
@cphillips said:
JaViXP it will work better if you change the onend to this:
onend{ > group.erase! > }
Thanks, now it's much better (After a few times playing the animation it becomes kinda slow).
PhysicsGuy, well done I like your boxes creator, but there are too much boxes and it'll make the simulation laggy.
-
MAN! That camera is unbelievablly good.
-
It does not work for me
-
It's only half-SP related, but how do you move the ends of a script-created line using script? I've given up trying to replace existing lines on-the-fly, I figure it'd be easier to make them at the beginning of the simulation (or, if possible, before it), then move them every frame. They'd just be there to hold the faces for cloth, and something else I've got planned
EDIT: Figured it out! Took alot of searching around, the API documentation isn't all that helpful
I'm SURE this one's overcomplicated, but it's the only way I could find.EDIT: Hopefully, I've fixed the problem
-
That's wierd, but it should be fixed now.
-
Awesome
-
Thanks it worked now. I have to agree with Phy, AWESOME!!
-
Here is a script that makes a simple to use auto connecting joint. In the first frame. The "pin" object automatically connects to any "door"'s it is touching with a hinge and anything else with a fixed joint. What makes it really useful is it copyable.
Note I made the "pin" object very dense and no collide. It didn't work very well otherwise.
-
Thanks for the tips Chris. Here's some movable, breakable objects (Kinda laggy, but fun )
-
Well done I like it!
So, Chris, any new features we missed?
-
Took quite a while to code this right, and I can't get the faces to smooth, but here it is! Seamless cloth!!
-
Um, CPillips how do you use the breakit command or is it a command. I don't mean the split command by the way. Wacov that's fantastic.
-
I'm on a roll...
Turns out you CAN reset the simulation from within the script. Use this little chunk of code:
@@bPause=true SketchyPhysicsClient;;physicsReset() MSketchyPhysics3;;closeControlPanel() freeDirectInput()
In the scripted field.
I found this near the bottom of SketchyPhysicsTool.rb, it seems to work totally normally for me, but if there's a problem, there's not much I can do about it
-
That sounds cool! I can't try this though, it displays an error
By the way, is there a way to stop the simulation and save it as the model? I mean, you are running the simulation with a breakable box, the box is broken, can you copy the model and paste into other model? (Sorry, my English is hard to understand )
-
It doesn't work for me ether wacov I get this error, taken from the ruby console:
String doesn't compile; Error in Script: @@bPause=true SketchyPhysicsClient;;physicsReset() MSketchyPhysics3;;closeControlPanel() freeDirectInput() (eval);4;in `initEvents'; undefined method `freeDirectInput' for #<MSketchyPhysics3;;SP3xBodyContext;0x5dd6378>#<RuntimeError; Error in Script: @@bPause=true SketchyPhysicsClient;;physicsReset() MSketchyPhysics3;;closeControlPanel() freeDirectInput() (eval);4;in `initEvents'; undefined method `freeDirectInput' for #<MSketchyPhysics3;;SP3xBodyContext;0x5dd6378>> C;/Program Files/Google/Google SketchUp/Plugins/SketchyPhysics3/ControllerCommands.rb;966;in `initEvents'
and Javi just pause the simulation and save the model.
-
@javixp said:
Well done I like it!
So, Chris, any new features we missed?
Well, there is a lot that is still possible. I haven't seen anyone using teleport yet. Nor getVelocity/setVelocity, getTorque/setTourque or setLinearDamping/setAngularDamping. Any script connected joint can also be disconnected but I dont know a good example for that. Also the scripted code area will take tabs now. That makes it easier to write readable script.
Advertisement