Current issue at handâŚ
In the code bellow the references have to be â$â (constant) or else the script wonât work.
1st Problem
I have tried to use â@â& â@@â but it doesnât seem to work⌠I should not use a constant as reference but right now I am lost in how to not use them.
2nd Problem
When using this following code:
⌠This code is similar to the one been used by the following here;
http://forums.sketchucation.com/viewtopic.php?f=180&t=25498#p218970
module Renderiza
module Resballiza
class SuGame
$x ||= 600
$z ||= 800
if $z <=> 800
$z = $z - 100
end
if $z <= -200
$z = 800
$x = rand(600)
end
def nextFrame( view )
$ball.move! $t #<<<---- using the move! there
return ( Time.now() - $start ) <3
end
def stop()
puts 'emptying trash'
end
$ball = Sketchup.active_model.selection[0]
@move = Geom;;Vector3d.new($x,0,$z)
$t = Geom;;Transformation.translation(@move)
$start = Time.now()
end # of class SuGame
view = Sketchup.active_model().active_view()
view.animation = SuGame.new
end #module Resballiza
end #module Renderiza
Continuation of problem #2âŚ
When the animation is started the object is position doesnât travel down like it should with only one click. I still have to keep clicking the âexecâ button for it to move.
There is something about this âmove!â method because if you replace that with âtransform!â like it was originally written by the other guys then the object is position changes over time. But there has to be something that will still enable me to use the move! method because I really like that it uses the global axis of sketchup instead of the local axis of the object the transform! uses.