Jump to content

No player physics when still and object moves into you


Vaelek
 Share

Recommended Posts

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

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

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!

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...