Yue Posted July 19, 2018 Posted July 19, 2018 How can I avoid this behavior? Script Lua. Script.rueda = nil --entity "Rueda" Script.chassis = nil --entity "Chassis" function Script:Start() self.posAmortiguador = self.entity:GetPosition() self.Amortiguador = Joint:Slider(self.posAmortiguador.x, self.posAmortiguador.y, self.posAmortiguador.z, 0,1,0, self.entity, self.chassis) self.Amortiguador:SetSpring(200 ) self.Amortiguador:EnableLimits() self.Amortiguador:SetLimits( 0, 0.01) self.Amortiguador:EnableMotor() self.Amortiguador:SetTargetAngle(0) self.posMotor = self.rueda:GetPosition() self.Motor = Joint:Hinge( self.posMotor.x, self.posMotor.y, self.posMotor.z, 0, 0, 1, self.rueda, self.entity ) self.Motor:DisableLimits() self.rueda:SetPickMode( 0 ) self.entity:SetPickMode( 0 ) self.rueda:SetFriction(1, 1 ) end local vel = 0 function Script:UpdateWorld() self.Motor:DisableMotor() if window:KeyDown(Key.W) then self.Motor:EnableMotor() self.Motor:SetAngle( self.Motor:GetAngle() - 100 ) if vel <=500 then vel = vel + 10 end end if window:KeyDown(Key.S) then self.Motor:EnableMotor() self.Motor:SetAngle( self.Motor:GetAngle() + 100 ) if vel <=500 then vel = vel + 10 end end self.Motor:SetMotorSpeed( vel ) end Quote
Solution Josh Posted July 19, 2018 Solution Posted July 19, 2018 You can see that since you are using a motor instead of a spring, the correction force is constant. A spring would increase the force as it gets further from the equilibrium point. I will be looking at the spring damper soon to see if we can minimize bouncing / harmonics. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Yue Posted July 19, 2018 Author Posted July 19, 2018 11 hours ago, Josh said: You can see that since you are using a motor instead of a spring, the correction force is constant. A spring would increase the force as it gets further from the equilibrium point. I will be looking at the spring damper soon to see if we can minimize bouncing / harmonics. I'm telling you that if he didn't activate the engine, he's still bouncing the tires a lot, even if he puts a value of 1 in the spring. I'm going to make a video to explain it better, the thing is that the translator doesn't help me much. Quote
Josh Posted July 19, 2018 Posted July 19, 2018 1 hour ago, Yue said: Here video. I believe you. Newton has three parameters for the spring. I only exposed one and automatically filled in the other two. Obviously I need to expose all three. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Yue Posted July 19, 2018 Author Posted July 19, 2018 Thank you, the truth is that the translator is often a real problem. Spring to Spanish equals "Primavera" "Primavera" in Spanish I understand is a time of year, along with winter, fall and summer. That's why I think the best way is to make the videos. Quote
Josh Posted July 19, 2018 Posted July 19, 2018 Elastic? Does that make more sense? Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Yue Posted July 19, 2018 Author Posted July 19, 2018 2 minutes ago, Josh said: ¿Elástico? ¿Eso tiene más sentido? If perfect, I have understood it by force, try after try, a spring, the same happens with certain words, for example Handle tells me that it is a green tropical fruit. I suppose everything would be easier if he spoke English, but I think that with the persistence I already have a car system that I imagined impossible before, and it all started with your suggestion of springs, sliding joints and hinge joints. Translated with www.DeepL.com/Translator 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.