Ghost Posted July 25 Share Posted July 25 Hello. I encountered a problem that a closed door can be opened with a lifted object. Any ideas on how to fix this with minimal changes to the standard door script? Quote Link to comment Share on other sites More sharing options...
Josh Posted July 25 Share Posted July 25 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... Quote 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 More sharing options...
Ghost Posted July 25 Author Share Posted July 25 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. Quote Link to comment Share on other sites More sharing options...
Ghost Posted July 25 Author Share Posted July 25 https://youtu.be/RWsnkH98EuA Quote Link to comment Share on other sites More sharing options...
Josh Posted July 25 Share Posted July 25 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. Quote 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 More sharing options...
Josh Posted July 25 Share Posted July 25 You can also set the max force and torque of the door joint, which will counteract the held object. Quote 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 More sharing options...
reepblue Posted July 26 Share Posted July 26 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. Quote Cyclone - Ultra Game System - Component Preprocessor - Tex2TGA - Darkness Awaits Template (Leadwerks) If you like my work, consider supporting me on Patreon! 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.