From 0886cc41a921a710fcbdba754787647c7c68a2b4 Mon Sep 17 00:00:00 2001 From: Ciaran Gultnieks Date: Wed, 5 Mar 2014 17:57:06 +0000 Subject: [PATCH] Rotation is far too buggy --- init.lua | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/init.lua b/init.lua index 3ffb5a8..1d8df95 100644 --- a/init.lua +++ b/init.lua @@ -217,22 +217,7 @@ function heli:on_step(dtime) --Set speed to entity self.object:setvelocity({x=self.vx, y=self.vy,z=self.vz}) - --Model rotation - --[[if self.driver then - self.model:set_attach(self.object,"Root", - {x=-(self.driver:getpos().x-self.object:getpos().x)*dtime, - y=-(self.driver:getpos().z-self.object:getpos().z)*dtime, - z=-(self.driver:getpos().y-self.object:getpos().y)*dtime}, { - x=-90+self.vz*5*math.cos(self.yaw)-self.vx*5*math.sin(self.yaw), - y=0-self.vz*5*math.sin(self.yaw)-self.vx*5*math.cos(self.yaw), - z=self.yaw*57}) - else]]-- - if self.model then - self.model:set_attach(self.object,"Root", {x=0,y=0,z=0}, { - x=-90+self.vz*4*math.cos(self.yaw)-self.vx*4*math.sin(self.yaw), - y=0-self.vz*4*math.sin(self.yaw)-self.vx*4*math.cos(self.yaw), - z=self.yaw*57}) - end + end --