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"

Angular drive doesn't work with locked motions

I'm trying to create a physics constraint using the Physics Asset Tool. I've noticed that the Angular Motor doesn't seem to work if one or more angular motions are locked.

To reproduce this:

  1. Create a Physics Constraint in PhAT

  2. Configure it as a Hinge Joint

  3. Enable the Angular Orientation Drive with a high enough spring parameter

  4. Simulate, gravity will freely change the orientation as if there's no motor enabled

Is this the expected behaviour? Setting the locked motions as Limited or Free makes the motor work, but I'd like to keep them locked if possible.

Product Version: Not Selected
more ▼

asked Jun 07 '14 at 10:59 PM in Bug Reports

avatar image

259 12 15 29

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

1 answer: sort voted first


This behavior is expected. The reason is that under the hood PhysX will ignore the motor if you have any degrees of freedom locked: docs

Depending on the effect you're trying to achieve you could use soft spring limits which are found under angular limits. These will work as traditional springs though, meaning that velocity motors will not work.

If you have access to the code you could try playing with the angular motor mode. We are using SLERP, which is the only case where angular motors will be turned off. If you change this to Swing & Twist you would have better luck, though I don't know the full implications of this.

I may take a look at this at some point and see if we can switch to it so that this case is no longer a problem.

Please let me know if you run into any more issues.

more ▼

answered Jun 11 '14 at 09:26 PM

avatar image

[Epic]Ori Cohen STAFF
1.4k 25 14 59

avatar image lucasncv Jun 11 '14 at 10:12 PM

Thanks for the response, Ori. Yes, I'm now using Swing & Twist motors and, fortunately, that led to some great results.

However, it was very difficult to find the correct Build.cs setup to get access to PhysX. I'd also like to ask: is there any legal issues when using PhysX code directly in game's code?

avatar image [Epic]Ori Cohen STAFF Jun 12 '14 at 02:28 PM

I'm curious what you mean by finding the correct build.cs - I would have expected the only changes you'd have to make would be inside constraintinstance.cpp

As for releasing PhysX code directly: this is up to NVIDIA. I'm not sure what their plans are for this, but my guess is this will not happen any time soon.

avatar image lucasncv Jun 12 '14 at 02:31 PM

What I mean is that I'm accessing PhysX functions directly in my game's code, I did not change UE4's FConstraintInstance. So I had to adjust my Build.cs to include PhysX headers. Does this process of calling PhysX functions from my game module have any legal issues?

avatar image [Epic]Ori Cohen STAFF Jun 12 '14 at 05:05 PM

calling PhysX functions from your game is fine

(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