Hi Roland,
first, i have to thank you for your amazing work about this soft !
I'm able to rotate axis motor but I can't animate Engine piston on cylinder:
In fact if you can share me your 8860 script animation, i'll probably be able to make it !
first, i have to thank you for your amazing work about this soft !
I'm able to rotate axis motor but I can't animate Engine piston on cylinder:
- make an axial movement of Engine Piston Round (2851.dat) into cylinder (2850.dat)
- make an circular movement and not a rotation of valves (radius: 10,5 / center: 0,0,0)
Code:
local ani=ldc.animation.getCurrent()
local angle=ani:getFrameTime()/ani:getLength()*360 --current angle of the wheel around the first chain point.
local linkLen=10 --length of single chain segment.
local pntRadius=10,5 --current radius of the first path point.
local linkAngle=math.deg(math.tan(linkLen/pntRadius)) --angle difference on the wheel for a single link.
local pntAngle=angle % linkAngle --frame's angle, this will create the illusion of a continues move around the whole chain.
local chainSf=ldc.subfile('piston.ldr')
local chainPnt=chainSf:getGroup('Group 1') --use a group as the current api can't set matrices for non references (is pending).
--apply the angle this will trigger a path regeneration.
local ori=ldc.matrix()
ori:setRotate(pntAngle, 1, 0, 0)
chainPnt:setOri(ori)
In fact if you can share me your 8860 script animation, i'll probably be able to make it !