Jump to content

Need help with pickable crates


Suomis
 Share

Recommended Posts

Hi!

 

I'm quite a newbie with LE, but I've gone through all the non-lua-tutorials. I'm making a map which I try to use all the basic features in to learn their proper uses. I'm currently struggling with making a pickable crate. It falls through the floor every time I set it's mass to anything but 0 and I can't seem to get it to collide with the player either.

 

The crate is crate_small.mdl expanded to 300% size with physics set as Rigid body and collision as Prop. So far the only script attached is impactnoise.lua.

 

The floor beneath is a standard box with no scripts. It's set as Rigid body and Scene with a mass of 0. It's also a nav obstacle and the material used is greygrid.mat.

 

What I would want the crate to do, is for it to be located somewhere in the scene so the player has to pick it up and use it to get onto the ramp and to the control panel. Thus, I need it to collide with the player and environment and it needs to be pickable.

 

I have 3 screenshots attached:

Sieppaa1.png = picture of the scene with the crate located where it needs to be lifted by the player. Also includes physics of crate.

post-16771-0-14611500-1453389349_thumb.png

 

Sieppaa2.png = Scripts of the crate

post-16771-0-43728700-1453389359.png

 

Sieppaa3.png = The floor's physics

post-16771-0-20992800-1453389368_thumb.png

 

There might be some brainfart on my end since I'm new, but I can't seem to figure it out. Any help will be appreciated. Thanks in advance!

Link to comment
Share on other sites

Yeah, I think in the future we're going to eliminate the separate "Prefabs" directory and store them with the model, since they are almost always just based on one model.

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

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