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"

Question about Dynamic Collision Recreation

Dear Friends at Epic,

I know SplineMeshes are not ready yet, but when they are, I am very excited about using them in my in-game editor

But for me to be able to manipulate the spline during game time, I would also need to be able to re-create collision on the fly.

I see the function is there already, but it is limited to use with the editor


RecreateCollision

I noticed that RecreateColllision() only worked WITH_EDITOR

is there a reason we cant call this from c++ during game time in a shipping build?

 #if WITH_EDITOR
     // Builds collision for the spline mesh (if collision is enabled)
     void RecreateCollision();
 #endif

I Entreat You To Please Make This Runnable During Game Time

Because then I can fully implement dynamically changeable Spline Meshes in my in-game editor!

:)

(Again my in-game editor is in no way meant to mirror the Rocket Editor, it is an in-game editor because every feature is game-specific and using my own in-game interface).

Thanks Epic Devs!

Rama

Product Version: Not Selected
Tags:
more ▼

asked Mar 11 '14 at 02:22 AM in C++ Programming

avatar image

ue4-archive ♦♦ STAFF
49.6k 3637 1964 9090

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:22 AM

Hello Rama,

We're working toward responding to your question as soon as possible. Thanks for your patience.

Sean

avatar image CallMeMax Jun 07 '16 at 10:06 AM

Just ran into the same problem. Wanted to use splines to make the wall system of a RTS game but yeah, the collisions aren't re-created when spawning splines outside of the editor... :<

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

4 answers: sort voted first

I'm going to check if it actually depends on anything editor-wise, and if not I'll remove the #if WITH_EDITOR for you, with a warning that it will probably be slow. In the editor, we had to implement code that defers the recreation of the collision while you are altering a spline, because it was too slow to do realtime while you were dragging points around.

more ▼

answered Mar 11 '14 at 02:22 AM

avatar image

ue4-archive ♦♦ STAFF
49.6k 3637 1964 9090

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:22 AM

woohoo! thanks so much Gareth!

I am very happy to be the recipient of your first answer :)

Rama

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:22 AM

Unfortunately RecreateCollision calls various functions on UBodySetup that on cooked platforms (i.e. non-editor) only support loading cooked physx collision data, not creating it on the fly. Sorry, but making USplineMeshComponent::RecreateCollision() able to be called during game would require this restriction to be lifted, and I don't think that's something Epic will want to do.

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:22 AM

aww well,

I will still be able to create some awesome prefab meshes using splines for ramps and race tracks etc

It's nice to know for sure though, so thanks Gareth!

Rama

avatar image RyanGadz Jul 30 '15 at 06:38 PM

Is this ever going to happen? I built a game that procedurally generates a spline mesh tunnel at run time and got burned because its not possible. Now I'm currently Greenlit on Steam and don't know what to do other than making prebuilt levels.

avatar image Imagine-Games Oct 04 '18 at 03:31 PM

did you ever figure a solution to this?

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

I suppose that is because it's expensive since we have to create collision in game when spline has changed. I'm adding Jack for more detail of plan.

more ▼

answered Mar 11 '14 at 02:22 AM

avatar image

ue4-archive ♦♦ STAFF
49.6k 3637 1964 9090

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 02:22 AM

It would be really great if I could run that function during game time for use with my in-game editor, once splinesmeshes officially are released!

:)

Rama

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

Just ran into the same problem. Wanted to use splines to make the wall system of a RTS game but yeah, the collisions aren't re-created when spawning splines outside of the editor... :<

more ▼

answered Jun 07 '16 at 10:06 AM

avatar image

CallMeMax
3 2 3

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

Just saw the 4.12 Changelog... "Collision can now be generated for Spline meshes created at runtime." !!!

YES!

more ▼

answered Jun 07 '16 at 10:28 AM

avatar image

CallMeMax
3 2 3

avatar image Imagine-Games Oct 04 '18 at 03:32 PM

really? i got no such feature in 4.20....?!

(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