Jump to content

NoIE

Members
  • Posts

    24
  • Joined

  • Last visited

NoIE's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. Can I use physics sub-stepping ?
  2. My program will start running and then close immediately. I think I linked parentObj, Because Start function uses parentObj. I also checked the editor. Just now, I tried to remove the link, and then I find
  3. code:Script.parentObj = nil--entity function Script:Start() self.center = self.entity:FindChild("center") if self.center~= nil then local pos = self.center:GetPosition(true) self.jointBall = Joint:Ball(pos.x, pos.y,pos.z,self.entity,self.parentObj) ------------------------------------------------------------------------------------------------------ -- There are also "self.parentObj:Get...", but it will not cause problems. self.length = pos:DistanceToPoint(self.parentObj:GetPosition(true)) ------------------------------------------------------------------------------------------------------ end end --[[function Script:Collision(entity, position, normal, speed) --if speed> 0.01 and entity.script.tag ~= nil and entity.script.tag == "player" then -- entity.script:TakeDamage(3) --end end]]-- function Script:UpdatePhysics() local pp = self.parentObj:GetPosition(true) local cp = self.center:GetPosition(true) local d = cp local length = d:Length() --if length > self.length+0.1 then -- local np = pp + d:Normalize()*self.length - (cp - self.entity:GetPosition(true)) -- self.entity:SetPosition( (self.entity:GetPosition(true)*3 + np )/4 , true) --end end When I commented " local pp = self.parentObj:GetPosition(true)", it can run, otherwise break immediate. It without any warning.
  4. I was made in accordance with that tutorial scene. Set sphere mass for 30: Set sphere mass for 15: Set sphere mass for 7: It is like a spring balance.
  5. There are many cylinders, their names are ropeRoot, rope2, rope3 ... Each cylinder have a children - center. code JointBall.lua for ropeRoot, rope2, rope3 ... : Script.parentObj = nil--entity function Script:Start() local center = self.entity:FindChild("center") if center~= nil then local pos = center:GetPosition(true) self.jointBall = Joint:Ball(pos.x, pos.y,pos.z,self.entity,self.parentObj) end end code Mass.lua for Sphere 1 : Script.parentObj = nil--entity function Script:Start() local center = self.entity:FindChild("center") if center~= nil then local pos = center:GetPosition(true) self.jointBall = Joint:Ball(pos.x, pos.y,pos.z,self.entity,self.parentObj) end self.timer = Time:GetCurrent() + 8000 end function Script:Draw() if self.timer < Time:GetCurrent() then self.entity:SetMass(30) end end After 8 seconds, the sphere's weight is set to 30. edit: Can I use physics sub-stepping ?
  6. code JointBall.lua for ropeRoot, rope2, rope3 ... :Script.parentObj = nil--entity function Script:Start() local center = self.entity:FindChild("center") if center~= nil then local pos = center:GetPosition(true) self.jointBall = Joint:Ball(pos.x, pos.y,pos.z,self.entity,self.parentObj) end end code Mass.lua for Sphere 1 : Script.parentObj = nil--entity function Script:Start() local center = self.entity:FindChild("center") if center~= nil then local pos = center:GetPosition(true) self.jointBall = Joint:Ball(pos.x, pos.y,pos.z,self.entity,self.parentObj) end self.timer = Time:GetCurrent() + 8000 end function Script:Draw() if self.timer < Time:GetCurrent() then self.entity:SetMass(30) end end After 8 seconds, the sphere's weight is set to 30. edit: Screenshot with Skybox.
  7. Thanks, but I click apply button, and then re-attach the bones to their respective vertex groups, this mdl file still no animation. In the model editor, I can't see animation, but shadows moving. http://youtu.be/EaaOyK7S6Gk I use Ubuntu 14.04.
  8. It's my blender file: https://drive.google.com/file/d/0B08O9NDn_X6WZGcwYXlweWVRWmM/view?usp=sharing It's my mdl file: stevie.mdl https://drive.google.com/file/d/0B08O9NDn_X6WNkVnYzNhS1MxZVE/view?usp=sharing I use Blender 2.72b But it without animation in leadwerks model editor. Where is the problem? **********************************************************************Solved************************************************************************ Specify the model textures before I export to mdl file, the problem is solved. But model is flash in model editor with Linux(Ubuntu 14.04). In Windows 7, the model don't flash.
  9. http://youtu.be/EaaOyK7S6Gk The animation does not play.
  10. oh, I did not lack a sense of humor, I'm just a lack of vocabulary. China's exam-oriented education.
  11. Fix yo Loonix, dawg!What is Loonix ?
  12. Thank you! but I was just wondering whether I can lock X axis and Z axis with use Point function.
  13. This morning, Leadwerks ushered in a minor update, and then prompts you must update my project, but I do not know how to do it. So I want to delete my porject, and then import it. So I clicked Delete button in Porject Manager, but I lost my files, from folder and trash.
  14. video: code: function Script:UpdateWorld() self.entity:Point(self.player, 2, Time:GetSpeed() * self.rotSpeed) ---- Can I remove follow 4 line ? rotation = self.entity:GetRotation() rotation.x = 0 rotation.z = 0 self.entity:SetRotation(rotation) .... ....
×
×
  • Create New...