Jump to content

Door physics problem


Ghost
 Share

Recommended Posts

What if you just increase the mass of the door? Or maybe use a box collider so objects can't grab onto the door? I can't see exactly what is going on...

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Gaining mass didn't help at all. There is a box collider on the door. So far I have made the doors zero mass, which increases when activated. This way objects do not affect the door.

Link to comment
Share on other sites

Ha! That's actually pretty interesting to see.

Okay, this is a little tricky. You could lessen the maximum force and torque applied to the kinematic joint that is used to pick up objects. However, if you lower those values the objects won't snap to position as quickly, and you will get a rubber-banding effect. So you probably do want those forces to be quite high.
https://www.ultraengine.com/learn/Joint_SetMaxForce?lang=cpp
https://www.ultraengine.com/learn/Joint_SetMaxTorque?lang=cpp

Your solution of setting the object's mass to zero when it is not active is probably a good one for most scenarios.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

You can also set the max force and torque of the door joint, which will counteract the held object.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

5 hours ago, Josh said:

Your solution of setting the object's mass to zero when it is not active is probably a good one for most scenarios.

This is what I did in Cyclone. There's that 0.001% chance were the doors might snap open/close though. 

Cyclone - Ultra Game System - Component PreprocessorTex2TGA - Darkness Awaits Template (Leadwerks)

If you like my work, consider supporting me on Patreon!

Link to comment
Share on other sites

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.

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.

 Share

×
×
  • Create New...