Vaelek Posted February 11, 2015 Share Posted February 11, 2015 This thread compliments another that I was asked to start a new report for. A map/project showing the issue can be found at https://drive.google.com/file/d/0B6I7ft5g9GMfaVBUeV9oak0ya2M/view?usp=sharing To reproduce the problem, open the barn door, stand in it's path, and close the door while staying still. The door will pass through the player, and upon moving afterward, the player will be ejected out of the way, sometimes even being killed in the process. If the player is moving in any way, even just with the mouse, when the door hits, he is pushed out of the way as expected even if you stop moving after you begin being pushed. (Occasionally a directional key has to be hit before physics kick in, but most of the time just looking around works) Edit: I am using the beta Quote Link to comment Share on other sites More sharing options...
Josh Posted February 11, 2015 Share Posted February 11, 2015 Thanks. Should be an easy fix. 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...
Admin Posted February 12, 2015 Share Posted February 12, 2015 The problem is that you are not using physics for the door movement. You are manually positioning the door, which breaks the physics simulation. Plus, it has a mass of zero. Therefore, the player will only collide with the door if they are in motion, and the door will never collide with the player. I recommend making a copy of the sliding door script and modifying that to suit your needs. Quote Link to comment Share on other sites More sharing options...
Vaelek Posted February 12, 2015 Author Share Posted February 12, 2015 I see. My first attempt was to use the sliding door script, but it seemed to get stuck on the building model and would just kind of shake in place so I made my own. My Lua skills have increased since I made that so I guess I will revisit that and try to come up with a better solution or try to understand the problem with the built in script in my setup. Thanks! Quote Link to comment Share on other sites More sharing options...
Admin Posted February 12, 2015 Share Posted February 12, 2015 If you change the collision type of the door and the building both to "Scene" they won't collide with each other: http://www.leadwerks.com/werkspace/page/documentation/_/command-reference/collision-r778 1 Quote Link to comment Share on other sites More sharing options...
Vaelek Posted February 12, 2015 Author Share Posted February 12, 2015 Aha, thank you very much. Little things like that keep biting me and I end up overthinking them a lot more than necessary. But I did learn some things while creating my version of the door script so it wasn't a total loss. 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.