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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Get velocity of object that not simulating physics?

I understand if I enable physics on something I can get eh velocity, but I don't want to enable physics on these objects, yet they are being swung/thrown/moved around in the space and I still want to know the speed of the movement of them.

Any way to do this?

Product Version: UE 4.11
more ▼

asked Jun 15 '16 at 02:43 AM in Blueprint Scripting

avatar image

654 38 37 71

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

1 answer: sort voted first

Since there are no answers, I'll write my method.
I am doing it by subtracting current location from last location and getting a vector length of that vector. The result is in unit/frame which you can divide by "get world delta seconds" to convert into unit/seconds.
- Last location is a vector variable, which is set on tick after getting the result.
A bit hacky way would be to add a constrained physics object to the one you want to measure speed of and use get velocity node on that constrained physics object (haven't tried this one though).
If there is a better way please let me know, I could use it :)

more ▼

answered Nov 23 '16 at 03:52 PM

avatar image

198 17 17 25

avatar image Rareden Jan 23 '19 at 03:13 AM

Old thread but alternatively you can use a flip flop on the tick, i.e, A sets position, B does nothing or computes the velocity. Either way you will get the difference between the frames

(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