Another Ramplayer with a twist, very simple to use, developed because there wasn't anything like this :-)
You can compare recent rendering against the first one, reset all etc. Try it, download here
45 Isoveli valvoo?
12 hours ago
def = attributes wheelCtrl
(
local dist=0
local lastTime=0
)
myCircle = circle name:"Master" radius:30
custAttributes.add myCircle def
myCyl = cylinder radius:30 height:10 name:"Wheel"
rotate myCyl (eulerAngles 90 0 0)
move myCyl [0,0,30]
myCyl.parent = myCircle
myRotCtrl = myCyl.rotation.y_rotation.controller=float_script()
myRotCtrl.addNode "master" myCircle
myRotCtrl.script = "
if F==0 then
(
master.wheelCtrl.dist = 0
master.wheelCtrl.lastTime = 0
)
--The old and the current pos
p0 = at time (master.wheelCtrl.lastTime) master.pos
p1 = master.pos
--Get the distance traveled
newDist = distance p0 p1
--The direction of the wheel travelling
multi = dot master.transform.row1 (normalize (p1-p0))
--Calculate the rotation and add it to CA var
master.wheelCtrl.dist += multi * newDist / (master.radius)
--Set the last frame to current frame
master.wheelCtrl.lastTime = F
--apply result
master.wheelCtrl.dist
"
messing with my Max