SketchyPhysics 3x June 27 version.
-
@unknownuser said:
Never really got back to this one: Are we going to be able to set an object's scripting from an external source code?(ie setting an emitted object to explode on impact.)
Any SU ruby would work, ao you might be able to load an external .rb file as an ontick func, or whatever. But you don't need that to do what you're asking, as Jav has shown; and anything that SU can detect can be acted upon.
-
@wacov said:
@unknownuser said:
Never really got back to this one: Are we going to be able to set an object's scripting from an external source code?(ie setting an emitted object to explode on impact.)
Any SU ruby would work, ao you might be able to load an external .rb file as an ontick func, or whatever. But you don't need that to do what you're asking, as Jav has shown; and anything that SU can detect can be acted upon.
Hi everyone. Sorry I have been quiet lately. Been taking some time off and enjoying the summer.I think it is possible to set events externally with this version. I know the the syntax is a bit weird and I plan to clean it up.
Create a good sized cone and put this in its scripted field.
b=copy b._setEvent("ontick", <<CODE push([0,0,1])#go forward if(frame>50) destroy #die after 50. end CODE )
The cone will copy itself and then set the "ontick" event in the copy.
I tried to make an example that uses "ontouch" but it didnt work for some reason. I will have to debug it.
-
Sorry I don't have much to add, but there are a few things. I'm no programmer, I'm on the mechanical team.
-
You guys are blowing my mind. Wacov, when I opened your cloth file my jaw dropped for so long I almost drooled on my cat.
@unknownuser said:
Can we upload with this version if we don't use the new features?
- I needed an excuse to upload the Gopher.
-
-
Nice model!
-
Thank you, have another.
I figured out the scripted joints (big for me) to the point where I used universal joints for the bogies and you can copy more cars to the train, but the problem is I had to daisychain the joints under the cars so much the sag makes the cars lean in turns. Just beware of derails, they seem to be quite frequent...
If anyone can figure out a way around this, that would be great.
-
@norviewsveteran said:
- You guys are blowing my mind. Wacov, when I opened your cloth file my jaw dropped for so long I almost drooled on my cat.
@cphillips said:
I think it is possible to set events externally with this version. I know the the syntax is a bit weird and I plan to clean it up.
Create a good sized cone and put this in its scripted field.
b=copy > b._setEvent("ontick", > <<CODE > push([0,0,1])#go forward > if(frame>50) > destroy #die after 50. > end > CODE > )
The cone will copy itself and then set the "ontick" event in the copy.
I tried to make an example that uses "ontouch" but it didnt work for some reason. I will have to debug it.
It totally crashes my SU when I try it in ontouch, and freezes the sim in ontick... also, I can't drag the original object. It highlights, and the drag line appears, but no movement
-
@unknownuser said:
I think it is possible to set events externally with this version. I know the the syntax is a bit weird and I plan to clean it up.
Create a good sized cone and put this in its scripted field.
Err... looks like you didn't try it in the right field.
-
I mean ontick/touch as in:
ontick{ ... }
Try it, see what you get.
-
I am not 100% sure that works in this version. It may depend on some unreleased code. Can anyone confirm it works?
-
It works for me.
-
Same for me.
-
It works for me, just not in any events.
-
@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.
-
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...
-
@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
-
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 -
@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 ? -
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.
-
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.
-
Did you mean OnTouch?
Advertisement