One controller
-
wow thx ur good
ow but i dont have an idea where to putif key("Up")==1 setVar("drive",1) elsif key("Down")==1 setVar("drive",-1) else setVar("drive",0) end
-
Somewhere in the model, just create a static box or something and put this (and the steering script) in the "ontick" field!
Then it will work
-
wow thx my friend xD
-
same thing as hpinsse's script, just all in one place:
setVar("drive",-(0.5-righty))
both do exactly the same thing, just that's shorter.
-
umm yea now i made a car (without steering, just forward and backward), but it doesn't move backward, only forward O.o A standard question: what is going on? xD
-
what scripts did you use?
-
well i used the hpnisse's script, now im trying yours
-
both don't work backward
-
I've got both work correct both forward and backwards.
Download and look this model.
hpnisse vs hobbnob.skpI don't know what you did but here I got both working with the up/down arrowkeys at same time.
Hope this helps understanding!
/hpnisse -
i checked it... and yea it works, but in my model, i think that its something with wheels... check this:
Car -
You use servo as motor, I changed it so all servo is the "motor" joint insted. and it work perfect.
Then I use my script and changed some stuffs so it would be easy to change the speed.
SamochΓ³d.skpTo change the speed of the wheels then change the number "3" in the "Speed" box.
if frame==1 setVar("speed",3) end
then it will work fine.
/hpnisse
-
ow... thanks i didn't think about the motor joint
thank you guys for all the help - this forum users are really intelligent - the car works perfecto
-
Good that your happy.
Have a nice summer! -
Thanks and you too ;D Ow, but an other question - what scripting language is it written in?
@EDIT
Because some of those Sketchy things are in Ruby.. but i think SketchyPhysics doesn't use it... -
It should be in ruby I think.
http://sketchyphysics.wikia.com/wiki/Ruby
It says that Ruby is used to control SketchupPhysics so I think SP would be written in that script. -
sooo.. now im gonna learn it a bit ;D
P.S.
The topic can be closed now
Advertisement