How to make a Speedometer?
Posted: Wed Jul 15, 2015 11:51 pm
Ok I've been making alot of improvements with my learning about algoengines. Now I can build, script, tune, and even design my own. I'm actually making my first car powered by a spawn engine and 5-speed transmission, but a speedometer is the only other thing I need.
Now let me be clear first before I ask how; I don't want complicated scripting, or the "proper" way to do it. I already know how I would, it's similar to how I do my tachometer.
First I use a laser, and in "onLaserHit =" I type e.geom.angvel = scene.my.rpm. Then I make the tachometer, and in the hinge for the needle I use scene.my.rpm as bendTarget. Now I figured I'd just do the same exact thing here for the speedometer. I tried using a laser and typing "onLaserHit = (e)=>{ e.geom.vel = scene.my.speed }" and it worked fine. It seems like it's getting that variable now, but when I try to type that into bendTarget it doesn't let me.
Am I just not typing it right? Do you get the velocity some way different than e.geom.vel? Once I figure this out I'll have my first car finished, so please help me out guys
Now let me be clear first before I ask how; I don't want complicated scripting, or the "proper" way to do it. I already know how I would, it's similar to how I do my tachometer.
First I use a laser, and in "onLaserHit =" I type e.geom.angvel = scene.my.rpm. Then I make the tachometer, and in the hinge for the needle I use scene.my.rpm as bendTarget. Now I figured I'd just do the same exact thing here for the speedometer. I tried using a laser and typing "onLaserHit = (e)=>{ e.geom.vel = scene.my.speed }" and it worked fine. It seems like it's getting that variable now, but when I try to type that into bendTarget it doesn't let me.
Am I just not typing it right? Do you get the velocity some way different than e.geom.vel? Once I figure this out I'll have my first car finished, so please help me out guys