Motor animation


RE: Motor animation
#3
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:
  • 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)
I tried to use chain script to inspired me but without success, as you can see :
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 !
Reply
« Next Oldest | Next Newest »



Messages In This Thread
Motor animation - by NEMOOZ - 2018-07-29, 19:04
RE: Motor animation - by Roland Melkert - 2018-07-31, 11:22
RE: Motor animation - by NEMOOZ - 2018-08-07, 18:33
RE: Motor animation - by Roland Melkert - 2018-08-07, 18:49
RE: Motor animation - by NEMOOZ - 2018-09-02, 13:56
RE: Motor animation - by Roland Melkert - 2018-09-02, 19:10

Forum Jump:


Users browsing this thread: 1 Guest(s)