x

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. 

[Bug] Max angular velocity doesn't work

Hi. I was working on a project and noticed that when collided something on edge, angular velocity of a physics object wouldn't stay at (0,0,0), even though I set Max Angular Velocity to 0 both in the project settings and a static mesh component of the object.

Here's how to reproduce the issue.

  1. Create a blank project

  2. Create Actor class buleprint

  3. Open the created actor and add sphere mesh

  4. Make the mesh the new root

  5. Set Simulate Physics to true on the mesh

  6. Set Enable Gravity to false on the mesh

  7. Set Max Angular Velocity to 0

  8. Open the Project Settings and from the Physic tab, set Max Angular Velocity to 0

  9. Call "Get Physics Angular Velocity" and create link to the Event Tick.

  10. Get reference of the mesh in the Event Graph and plug it into the target pin of the "Get Physics Angular Velocity"

  11. Call "Print String" and plug return value of the "Get Physics Angular Velocity" into the "In String" pin.

  12. Link "Get Physics Angular Velocity" with "Print String"

  13. Call "Delay" node on "BeginPlay" and set duration to 1

  14. Call "Add Impulse" and connect it to the delay node.

  15. Call "Get Actor Forward Vector" and multiply the return value by 100, then plug the calculated value to the "Impulse" input pin of the "Add Impulse" node.

  16. Place the actor on a level

  17. Place a cube along X axis of the actor and move it along Y axis to make sure the actor hits the cube on edge

  18. Hit play and check the printed value

You'll be able to see the printed value changes for a brief moment.

And one more thing; even if this turns out to be an actual bug, obviously the staff would need some time to fix it. The problem is, I'm kinda behind schedule.

So I was wondering if there is any other way to have a physics object ignore its angular velocity when hitting something so the velocity of the actor wouldn't be affected by the angular velocity?

Thanks in advance for your help.

Product Version: UE 4.17
Tags:
more ▼

asked Nov 07 '17 at 04:17 PM in Bug Reports

avatar image

netcop0207
81 8 12 19

avatar image Jeff A ♦♦ STAFF Nov 07 '17 at 06:29 PM

Hello, I do not seem to be able to get this to reproduce with the steps you provided. Is there any chance you could provide a project where you are experiencing this. Thank you.

avatar image netcop0207 Nov 07 '17 at 09:37 PM

Sure thing.

https://drive.google.com/file/d/1vve0fcAqfb_AvCntsFJcBHe3ZrRz4jjh/view?usp=sharing

FYI There's a minor change. I skipped setting Max Angular Velocity in the project settings(Step 8) and multiply forward vector by 10,000 instead of 100 (Step 15). Everything else is the same.

Let me know if you need anything else.

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

1 answer: sort voted first

Hello,

In this situation the physics here is working as intended so this is not a bug. For what you are trying to do using physics is not the best option. Using transforms with the sweep value checked would be much better. You can use ActorLocalTransform and ActorWorldTransform while using a lerp to go from one point to another over a set period. Just be sure to be using sweep with these.

more ▼

answered Nov 08 '17 at 06:00 PM

avatar image

Jeff A ♦♦ STAFF
3.2k 2 5 6

avatar image netcop0207 Nov 09 '17 at 03:36 AM

Don't really understand how that is considered working as intended.

avatar image Jeff A ♦♦ STAFF Nov 09 '17 at 02:50 PM

I'll try my best to clarify here. The way you were using physics in your Blueprint was setting the initial angular velocity. Once the object starts to move that angular velocity changes otherwise the object would never move. Your Blueprint would need a lot more logic in order to make it not move when it collides with something. At that point it is easier to just use the transforms I listed above rather than physics. With the current logic in the Blueprints provided the physics aspect of this is working properly. I hope this helps.

avatar image netcop0207 Nov 10 '17 at 07:56 PM

There's a lot more going on in the project so I need to simulate physics. Updating location manually is not the option here. And honestly I still don't get it. When I saw "Set Max Angular Velocity" I assumed this would determine the limit for angular velocity of an object rather than the initial value. If my interpretation is incorrect, then what's the point of having "Max Angular Velocity"? Also, I don't think I understand what you meant by "otherwise the object would never move". From what I've experienced so far, a physics object starting to move in a certain direction didn't really affect angular velocity and vice versa if there's no friction. Even in the project file I uploaded there's no change in angular velocity when it gets an impulse. It stays at (0,0,0).

avatar image netcop0207 Nov 10 '17 at 08:04 PM

I just did another test. If I add impulse to an object on a location other than the center of mass of the object, it begins to spin. But if I do the same thing with max angular velocity set to 0, it doesn't spin. So clearly that Set Max Angular Velocity node does something more than merely setting the initial value. alt text

physicstest-01.png (384.9 kB)
avatar image netcop0207 Nov 23 '17 at 05:27 AM

I do not know if this is a bug or not, but surely the answer doesn't fully explain what's happening. And sir, all due respect, I personally think you got some nerves to mark this as resolved yourself even after I presented another thing to look into. If anyone sees this, I can tell you, without any doubt, that what happened in my case is not supposed to happen and this problem is NOT resolved yet.

avatar image Jeff A ♦♦ STAFF Nov 23 '17 at 02:54 PM

This is not a bug as this is how angular velocity works. Angular velocity is when an object is traveling along a circular path the central angle to the objects position is changing. So forcing an angular velocity to 0 will prevent any rotation on that object. This is whey when you start adding some values to the angular velocity or changing the center of mass that object begins to spin.

Without full context of what your are trying to do and why it is sometimes difficult to provide the best answers. Meaning that I would not have recommended something had I known prior that manually updating the location was not an option. I apologize for the inconvenience and highly recommend asking your question in a separate section. Doing so will get your question the right people looking at it and thus lead to you getting the best help for what your doing.

If you want to find a way to do what you are doing using physics you will have to ask another question outside of the bug reports. Asking in the Using UE4 or the Blueprint scripting section would be more appropriate.

(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