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"

How to make sure that when I throw the weapon it fell to the ground and did not hang at certain coordinates?

alt text

I have a blueprint of dropping weapons, but when I press a button, my weapon just hangs at certain coordinates. And I want it to fall.

Product Version: UE 4.18
dropgun.png (249.2 kB)
more ▼

asked Mar 03 '18 at 07:16 PM in Blueprint Scripting

avatar image

Inteco Galaxy
0 1 6

avatar image Nebula Games Inc Mar 03 '18 at 09:16 PM

Looks like you're telling the weapon you drop to "spawn" at a certain location that is fixed based on the velocity vectors of the player at the time of drop. If you don't have "gravity" enabled and simulate physics on your weapon checked it would just spawn at the specified location and sit there. So my first thought it check and see if physics is enabled and gravity applied to your weapon mesh.

avatar image Inteco Galaxy Mar 04 '18 at 07:12 AM

"Gravity" is enable, but anyway guns flying)alt text

gravity-gun.png (531.4 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

You need to check the box that says "Simulate Physics" and the box that says "Enable Gravity". They both need to be enabled on the root component. The root component is the one at the root of the component tree in the blueprint editor. It usually starts out as "DefaultSceneRoot" but that won't do physics.

If you have DefaultSceneRoot then you can replace it with the mesh (drag-drop) so the mesh becomes the root component. Then enabling physics and gravity will work.

Or you can do what I do: use a collision component for the root. It gets physics/gravity/collision and the mesh has them all turned off. I find that to be more stable in the physics engine than using a mesh directly.

more ▼

answered Mar 04 '18 at 07:24 AM

avatar image

4.4k 32 79 42

avatar image Inteco Galaxy Mar 04 '18 at 08:48 AM

Did everything as you described. The problem is still viable.alt text

gravity-gun.png (633.4 kB)
avatar image Jin_VE Mar 04 '18 at 08:51 AM

You still have DefaultSceneRoot. The root component has to be a component capable of handling physics. SceneComponent is not. The physics box should be at the root. Just drag and drop it on top of DefaultSceneRoot and replace it.

avatar image Inteco Galaxy Mar 04 '18 at 09:31 AM

alt text

When the weapon starts, it disappears

gravity-gun.png (601.3 kB)
avatar image Inteco Galaxy Mar 04 '18 at 09:32 AM

alt text

gravity-guns.png (450.3 kB)
avatar image Jin_VE Mar 04 '18 at 09:35 AM

Is it falling through the floor? Set up the collision properly in the physics box. As I said, it needs physics, gravity and collision.

(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