Download

Collision

Hey,
Is there a collision where the player could overlap but the world not?
Because i want to drop a item from my character so that it fall on the ground…

Thanks :slight_smile:

Can you elaborate more ?
If you want to drop something from your character , you can enable physics for it at the specific time<like when you press some key> , and it will fall to the ground

How do i do this?

My Inventory works with overlap. So u pick a weapon up during overlaping it. So i want to drop a weapon -> falls to the ground -> but could be picked up by the player with overlaping.

In the collision settings you can set the collision preset to custom and then choose which channels will block, overlap or ignore.
So you will set it to overlap the pawn and block the world for example.

Okay and how could i set Physics of an Mesh or Object with my blueprint? :slight_smile:

didnt find a solution yet…

Here’s how you can do that from a BP:

59a9c7eee384c031001da1fb3382f98598956aab.jpeg

In my example, physics simulation is turned on when I press “F”. You should be easily able to adapt it to your script.

Cheers,
Michael

Thanks. And how does it work with Actor Begin Overlap?

Thank you very much! :slight_smile:

I’m not quite sure what you mean by “how does it work with actor begin overlap?”

If you want to drop an item from your inventory (I’m assuming it is an array), you have to first in some way choose what array element to drop, get the actor from that element, (spawn the actor in the level?) and if it is a “stackable item” you need to lessen the stack amount but if it is the last item or a none stacking item you need to remove it from the array.
I’m no professional but hopefully my approach is fairly correct >.<

In the Content Example the alien space ship (I believe its under Blueprint Input or something along them lines) has an example of picking up objects, storeing them in an array and then dropping them back down on the ground. It shows picking up a physics enabled object (turning off the physics) storeing the object and then droping it back down while turning on the physics for the object.

You can find a lot of information on collision in the docs here: https://docs.unrealengine.com/latest/INT/Engine/Physics/Collision/index.html

I want to do this in my pawn:
fae2db6b25473148d0dd81990b3ef5985023c619.png

You want to simulate physics of the actor you dropped?

Yes and i picked up. My pick up is just when my pawn overlap an item. :slight_smile:

Well, then after you drop the item (remove it from array and spawn it in the world) get a reference to that specific item and then use the simulate physics?

Okay… i just detach the actor from actor :smiley: so the weapon from my player :slight_smile:
i will try yours. :slight_smile:

edit:dont get it…

Well what more exactly isnt working?

Why not using explicit pick up command? Like many games do, which is tried and true?
For games like quake, they just “throw” the weapon far ahead and only enable it’s pick-up-able when it lands.