Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

set "simulate physics" won't affect mesh

trying to implement a "drop weapon" feature in my FPS, the weapon detaches well from my character, but it won't simulate physics (trough i set it to) and just hang in the air where i last held it instead. any clues?

alt text the above picture is shot after taking a walk around the pistol. it didn't move, i did. alt text

Product Version: UE 4.9
more ▼

asked Dec 11 '15 at 07:58 PM in Blueprint Scripting

avatar image

925 20 44 64

avatar image cageman Dec 11 '15 at 09:36 PM

Does the weapon have collision around the mesh? I remember that is required for physics to work.

avatar image Arty-McLabin Dec 12 '15 at 01:43 AM

thanks for the support. is this what u mean? alt text the physical asset simulation works fine and the weapon falls down + breaks into parts on ground hit as it should. unlike outside of it.

avatar image Polivantage Jan 24 '16 at 08:47 PM

Apart from correct collision responses, the object seemingly must also use simple collision. That was the biggest issue for me since I was too caught up to actually read my log, but as I changed the collision to simple, and added a few shapes to keep it from falling through the floor, automagically my dropped items began behaving! yes.. luck.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

4 answers: sort voted first

You should not play with the default values of the gravity/physics, it's always better tho change thos stuff specifically for an action.

In the weapon blueprint you should do only these SIMPLE things.

when Equipping;

  1. Set Enable Gravity (With box not ticked, so it's not enabled)

  2. Attach Actor to Component

when Dequipping;

  1. Set Enabled Gravity (With the box ticked this time, so it is enabled)

  2. Detach Actor .

It's really that easy, and if you want or need the collison than add it as a step in Equipping and Dequipping, then use "Set Collision Enabled" in both steps, but changing the type of collision, to "No collision" when equipping/picking up, and your normal collision when dequipping/dropping.

more ▼

answered Dec 13 '15 at 07:51 AM

avatar image

152 12 12 17

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

as a last resort you could make your weapon skeletal, instead of static, which would also give you the ability to animate it during reload or something, anyway, with skeletal mesh you could use " set all bodies below physics blend weight", instead of simulate physics.

Simulate physics doesn't do crack for me either, not on meshes, not on main character, but the blending physics below some bone works all the time.

p.s. Collision shouldn't be something to change if you just want it to react to physics, unless you want to be like 100% sure to not have sticky fingers or something, having the player kick the weapon away during fall, which could again, be combated by simply setting weapon to ignore pawn collision channel instead of ignoring all collisions, but id guess since you're wielding the weapon you've already have that figured.

more ▼

answered Dec 13 '15 at 07:23 AM

avatar image

66 1 6 9

avatar image Arty-McLabin Dec 13 '15 at 04:57 PM

didn't help in my case, i've been also using skeletal mesh all that time

avatar image ImperiumPandemonium Dec 15 '15 at 12:55 PM

Did you try what I answered, if you just disable the gravity and not physics it should work. It works prefectly for me.

avatar image Arty-McLabin Dec 15 '15 at 03:52 PM

well in my specific case, it wasn't about the physics or gravity, turns out the reason was skeletal mesh parts, which were all somewhat set to "kinnetic".

besides, if you disable the gravity but not physics when holding the gun, doesn't it getting bugged out on every collision with other objects?

avatar image ImperiumPandemonium Dec 15 '15 at 09:53 PM

Yes, you need to disable physics to so it won't interact with other objects. But the common reason for it not actually falling down is Gravity not being enabled. As you explain your situation wasn't as ordinary as this problem is.

But if it were the ordinary problem with it just not falling down, setting gravity to enabled often resolves that.

avatar image Arty-McLabin Dec 15 '15 at 11:38 PM

isee what you did there :]

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Yes, thats it.

more ▼

answered Dec 12 '15 at 08:17 AM

avatar image

673 30 33 65

avatar image Arty-McLabin Dec 12 '15 at 11:18 AM

well it's how it was. i didn't set anything new. the problem is the same, any more ideas?

avatar image Arty-McLabin Dec 12 '15 at 12:12 PM

i've found out the collisions were set to "no collision", and after enabling it the weapon oversimulates physics, it is falling trough hands even when it should stick to them (non dropped) and also breaks to parts (skeletal mesh fragments)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Try waking the physics.

more ▼

answered Dec 12 '15 at 10:27 AM

avatar image

2.7k 161 274 254

avatar image Arty-McLabin Dec 12 '15 at 11:19 AM

can you please add some more explanation? i probably miss some term

avatar image MulleDK19 Dec 12 '15 at 05:05 PM

On the mesh, try to also call "Wake All Rigid Bodies", or something to that effect.

avatar image Arty-McLabin Dec 12 '15 at 09:38 PM

nope, same. could you look at the other branch of comments here? i've provided some additional info that could make some stuff clearer

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question