Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @name SimpleTorque [PcmciaKai]
- @inputs Accelerate Reverse Wheel:entity
- @outputs Wheelvel
- runOnTick(1)
- Wheelvel = Wheel:angVel():roll()
- # Change the vector (e.g. vec(1,0,0) right after the applyTorque to fit the rotating axis of your wheel master
- # If you needed to change that, you need to change line 5 as well, its either pitch, yaw or roll, that works
- # Change the number behind that vector to set an angular limit for the wheel
- # Change the multipliers behind Accelerate and Reverse to change acceleration speeds
- Wheel:applyTorque(vec(-1,0,0)*((3600-abs(Wheelvel))*((Accelerate*25)-Reverse*15)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement