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"

Resetting momentum on an object after dropping

Hi guys, another question.

I'm looking into resetting an objects momentum as soon as the player drops it (removes the physics handle), i want to try and get this implemented because i dont want the player to be able to spin the camera quick enough that when they let go the object will just go flying through the air. i want more control and that's why i plan on having the momentum of the object reset so it just drops to the floor and then i can get an actual poke/throw mechanic put in.

Any help with this would be great.


Product Version: Not Selected
more ▼

asked Sep 04 '14 at 02:22 PM in Blueprint Scripting

avatar image

41 7 9 9

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

1 answer: sort voted first

Hi LukePGM,

One possible solution I found was to add a SetAllPhysicsLinearVelocity node after you release the component.

You should have the variable for the Physics Object that is picked up set already. So you just have to plug that in. You will need to CastToPrimitiveComponent for it to work with the Linear Velocity node though.

alt text

Make sure to post back to let me know if this works for you.


more ▼

answered Sep 04 '14 at 06:50 PM

avatar image

41k 1009 183 494

avatar image LukePGM Sep 05 '14 at 09:58 AM

Hi TJ, i've got this implemented and it works, however ive noticed that the objects rotation is still effected by the velocity of the player camera, so if i spin the camera quickly and then drop the box it will spin as it falls to the ground, is there a way to prevent the objects rotation from being changed by the velocity in which it moves?

Thanks a lot.

avatar image TJ V ♦♦ STAFF Sep 05 '14 at 02:51 PM

Okay, how about this.

  • After the CastToPrimitiveComponent set SimulatePhysics to off.

  • Then immedietly set it back to on (this will stop all velocity and rotation).

  • Add a slight impulse to get the physics to start again (this shouldn't be neccessary but it is right now, this is a known issue that we are looking into).

You will still have a bounce on impact with the ground but that is just part of working with physics objects.

alt text

avatar image LukePGM Sep 08 '14 at 09:32 AM

Yeah ive got this in and it works perfectly. Thanks a lot.

(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