Slastraf Posted March 7, 2016 Share Posted March 7, 2016 local vec = self.entity:GetPosition() self.entity:SetPosition(vec.x,vec.y,0) Above the current sollution but it makes the character slower and very glitchy. Any better way to solve this ? Quote Link to comment Share on other sites More sharing options...
thehankinator Posted March 8, 2016 Share Posted March 8, 2016 Would you be able to use a slider joint lock it on to the axis? Quote Link to comment Share on other sites More sharing options...
Thirsty Panther Posted March 8, 2016 Share Posted March 8, 2016 Couple of suggestions from these threads. http://www.leadwerks.com/werkspace/topic/9836-2d-games-in-leadwerks-editor/ http://www.leadwerks.com/werkspace/topic/7785-2d-games-and-2d-joint-examples-in-lua/ Hope it helps. Quote Link to comment Share on other sites More sharing options...
Slastraf Posted March 9, 2016 Author Share Posted March 9, 2016 Josh said somewhere in this link : You do have the command Entity::PhysicsSetPosition which you can use to lock objects along a 2D plane without interrupting the physics simulation. That is what i needed local vec = self.entity:GetPosition() self.entity:PhysicsSetPosition(vec.x,vec.y,0) 1 Quote Link to comment Share on other sites More sharing options...
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.