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"

Can I display small viewport with animation playing in development build?

Hello,

I'd like to display an additional viewport in my game where user could preview given skill (animation). So I want it work just like preview animation thumbnail in editor. When user hovers a button a small window will appear with a looping animation in it.

I've got it working in editor by using custom viewport client class

 class FMyViewportClient : public FCommonViewportClient, public FViewElementDrawer, public FGCObject

custom viewport widget class - STestViewport and FPreviewScene.

In editor I can display the viewport (draw it propely), add any component to preview scene (skeletal mesh component in this case) and draw these component in viewport.

In game (development build) I can also display viewport and add components but I can no longer visualize any of them. List of components in FPreviewScene contains SkeletalMeshComponent so I know it's there but it's just not drawn.

So in FMyViewportClient class in Draw method I create a ViewFamily with FEngineShowFlags(ESFIM_Editor) (i tried ESFIM_Game also but it doesnt work either).

So I want to ask, is there any limiatation of FPreviewScene that makes it not render it's world correctly in development builds? Or I'm just missing something? Maybe there is a specific set of flags that I need to set on SkelMesh? I know it's hard to tell without looking into my setup but it's quite a lot of code so I'm not going to post it right now.

And in general, is it a good idea to use this method to create anim preview feature in game?

Cheers

Product Version: Not Selected
Tags:
more ▼

asked Jan 15 '15 at 10:24 AM in C++ Programming

avatar image

szyszek
595 16 10 36

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

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