Help with code
-
Hello,
I'm still trying to learn how to work in sketchy physics, and am missing some of the basic issues I guess.
In Sketchup, I can get the bounding box of an item very easy:
All I have to do is click on it and then run the following code:group = Sketchup.active_model.selection[0]
bb = group.bounds
bb.corner(0)However, in Sketchyphysics, I can't click on any item in 'runtime' Does anyone know how i'd get the bb.corner(0) of an object in runtime in sketchy physics?
I was doing some researching, and it looks like someone was using code like:
$curEvalGroup.transformation.origin[0]
To get the origin point of an object. But I don't understand how the $curEvalGroup was assigned! I looked all over the model and I couldn't find where it was set or even if it has anything to do with what i'm trying to accomplish.
The main goal here is to be able to figure out how to determine a groups position on the fly in sketchyphysics/ruby.
Thanks so much.
Joe
-
Well $CurEvalGroup applies to whatever object the script is in basically.
Advertisement