Jump to content
X54321

Physics Axis locking

Recommended Posts

For 2.5d games, I want to be able to restrict physics rotation & movement to certain axes. It should be kind of like how Unity does it, where the physics tab has checkboxes for each axis you want to restrict. You can just use self.entity:SetPosition() to restrict the axis, but this causes the physics to be...slow. It's not lag, but the physics object itself moves in a very strange fashion. It gradually slows down until it hits a complete stop, and then it speeds back up again.

Share this post


Link to post

This would be a real nice feature.

 

FYI if you use PhysicsSetPosition you don't get the lag you are talking about, however that function doesn't work on the character controller which is the kicker.

Share this post


Link to post

This has been requested since LE2. Platformers are a very common genre and I really hope this can be implemented at one point.

 

But I will warn you that as someone who's tried and failed using even Box2D to do this, there are more challenges involved than you'd guess. One of them is jittering down ramps. This was done with LE2 but I don't think it's changed since.

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...