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"

AnswerHub Maintenance

Background maintenance is scheduled to occur between 9 - 11am EDT on Tuesday, May 21. Site operation may be slower than normal during this time and a brief interruption in operation may be observed

Extending engine class (FBodyInstance)

Hi!

Problem
I have a skeletal mesh and am currently applying some custom physics (suspension, friction etc.) to all the FBodyInstances defined in the physics asset, accessed through Mesh->Bodies. However, I need a way of defining which bodies have the physics logic applied, instead of all of them.

Proposed Solution
I initially thought of simply adding a suffix to the bones I wanted to apply the logic to, however, re-importing the same skeleton with different bone names resets the physics asset, so making model changes would be a pain.

The ideal solution, as far as I can see, would be to add an editor toggle option to each body in the PhAT for my custom logic. This option would need to be accessible through FBodyInstance within the Skeletal Mesh Component.

So my question is, how would I go about (assuming it's possible) extending the default FBodyInstance struct with my own version to be used throughout the Engine, including in the Bodies TArray of my Skeletal Mesh Component and the PhAT? Is it possible to do this in a plugin? I've found resources on adding detail pane options within a plugin for a custom class, but nothing on extending engine classes in this way. Can it be done in a similar way to custom editor class by adding an Engine.ini entry?

Thanks!

Product Version: UE 4.13
Tags:
more ▼

asked Oct 21 '16 at 12:49 PM in C++ Programming

avatar image

ALP_Squid
16 1 2 6

(comments are locked)
10|2000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
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