Working on new scripting system.
-
@wacov said:
All this stuff is SO awesome... when you say linear/angular damping, will that act like a basic kind of air resistance?
Yes
@wacov said:
And what I'm really interested in, is if you set density to 0, what happens? Is it truly 0... i.e no weight or inertia? As long as it works ok as a noCollision object, attached to something else, then it's fine.
No. For some reason the physics engine treats objects with very low mass as static. Thats why really small objects dont move. Its lame in my opinion but not something I can change.
Depending on what you need a zero mass object for there may be something that will do what you want. I havent got it working yet but there is a new script command that will let you say where you want an object to be and it will "fly" to that location with out any sort of joint.
@wacov said:
Then with the torque and velocity; can you set them at runtime? And can you retrieve the object's current torque and velocity?
Yes.
@wacov said:
And, out of interest, isn't it now possible, with a few workarounds, to copy/paste and emit complex (jointed) objects? Just automatically connect each object with script at the beginning of the simulation, and do the same thing with emitters (if we can set an emitted object's script field...?)
Its possible. Objects that connect themselfs at start or on touching will work like that. But so far it still requires a lot of fiddly scripting. Not sure how it will turn out in the end.
I haven't exposed the emitters to the script yet. But you can do almost the same thing using the copy command.
Here is a simple teleport:
http://sketchyphysics2.googlecode.com/files/teleport2.wmv -
I suppose you can set velocity and torque to 0 when teleporting? So, it doesn't always have to come out with the same momentum?
All this is really cool... I think you're gonna run out of features for SPIV
EDIT: Are you going to switch to Newton 2.0? I understand the beta is out... multi-core and speed optimizations sound tantalizing
-
SPIV will use 2.0. But dont expect it to be faster. The bottleneck is Sketchup rendering.
-
I'm optimisticly expecting improvements in Su's rendering, given the topics of the last survey... but that's just silly ol' me . Multi-core certainly seems to be expected, so maybe all's not lost
-
What is the script for the teleporter like?
-
@unknownuser said:
What is the script for the teleporter like?
setEvent("ontouch"){|toucher,speed,pos| if(toucher.name=="ball") toucher.teleport(toucher.position+[-500,0,0]) end }
When the object is touched by something named ball, teleport that object -500 in the X direction.
-
Is the delete command just '.delete'? Could you give us a breakdown of all the attributes/methods attached to the curEvalGroup class in the next version (assuming that's where '.position' now comes from). Oh, and I was wondering, how do you loop a block of code in Ruby, within a single frame, until the target is acheived?
-
You mean to delete a body? Its actually called "destroy". curEvalGroup will not be used in the new scripted field, its implied. Currently bodies have the following:
magnetic/solid/static/frozen
position/transformation
getVelocity/setVelocity
getTorque/setTorque
teleport
push
copy
destroy
connect/attach
split
setEventBody events are
onStart/onEnd
onTick
onKey,onButton,onMouse
onTouch,onTouching,onUnTouchLoops could potentially hang Sketchup. What are you trying to do exactly?
-
The pathfinding algorithm needs to run through a loop of a series of steps to find the path. The loop ends when the target is added to the closed list OR there are no Nodes left on the open list. I could always stick in a failsafe to carry it over to the next frame after a certain number of loops... be aware I'm not actually doing anything right now, I'm waiting for the next version . I've got plans that use the new features...
-
That doesnt sound like something you would want to do at runtime. Only when you actually move the nodes.
I think your node system will be easier with the new scripting system.
-
I HAS to be at runtime... the basis of any AI system is dynamic pathfinding. It'll re-calculate a route every time the target changes... anyway, if it crashes, I'll try something else
This explains it better that I can: http://www.policyalmanac.org/games/aStarTutorial.htm -
Quick question for Chris Phillips: I saw one of the videos that you posted, that demonstrated the new joint-connect script. As I recall, the connection looked much stronger than the current joint connections. Is this true?
-
I havent changed anything to make joints stronger. In fact I have been spending a bunch of time trying to figure out how to make a weaker kind of joint.
-
Any news on release yet... nothing specific, but a couple of weeks? More that a month? Throw me a bone here
-
I am sorry, I really dont know at this point. I am making good progress but so much of it is unfinished and during the summer the amount of time I can spend on it is limited. I might setup a closed beta so that you guys can start testing some of the new scripting features.
Lately I am working on doing the scripting interface in wxSU instead of webdialogs. That should make it a lot simpler to add new features. Also I am going to add some settings to fixed joints to allow them to be "springy". Its hard to explain but kinda fun.
-
@cphillips said:
Also I am going to add some settings to fixed joints to allow them to be "springy". Its hard to explain but kinda fun.
That's almost possible now; just move the joint fairly far away from the object that's attached to it.
-
A closed beta would be great! I appreciate it's just you, working on this huge plugin... if it's done when it's done, that's fine by me
-
Chris, can you tell us the new features that will be in the next release?
-
Almost all of the new stuff is outlined in this thread. Mostly it is the new scripting system which should make a lot of new stuff possible.
Beyond that there is the ability to set object density and maybe adjustments to how stiff some joints are.
-
Can we get SP3 X April 6 even if it's not done? I'm pretty sure many of us here would like to see new features. Please, CPhillips.
Advertisement