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"

SplineMeshComponent collision not working at runtime?

I installed UE4 two days ago and have been messing around with trying to procedurally create a track to traverse in a vehicle (building off the basic vehicle template). I've created a basic blueprint for a spline component which adds an appropriate number of SplineMeshComponents based on the amount of points on the spline. Using the event graph, I've then added functionality to extend the spline in the Y direction every time a key is pressed (F). Collision works fine for the initial points created in the editor, but collision does not seem to be enabled/working for anything created at runtime and I'm unsure of why. Here is an example using simulation mode and the "Player Collision" view.

alt text The location of the car is where the spline ends after having been created in editor mode. Collision seems to be working for the length of the blue arrow. The points after the vehicle (the length of the red arrow) do not seem to be working and the vehicle simply falls to the floor past it's current point.

Here is the blueprint's current construction script. alt text

Here is the blueprints event graph. alt text

I've selected "Collision Preset: Block All" for the function "Add SplineMeshComponent" in both cases. Does anybody have an idea as to what I'm missing in order for this to work?

Product Version: Not Selected
Tags:
ue4.png (52.6 kB)
more ▼

asked Jan 28 '15 at 06:40 PM in Bug Reports

avatar image

Callan White
15 1 2 4

avatar image TJ V ♦♦ STAFF Jan 28 '15 at 07:51 PM

Hi Callan,

For testing purposes, what version of the editor are you currently using?

avatar image Callan White Jan 28 '15 at 08:08 PM

Hi TJ, I'm currently using version 4.7 of the editor.

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

2 answers: sort voted first

Thank you for the report. I was able to reproduce this and I have entered it as JIRA UE-8565 in our tracking software. Our developers will be looking into the issue and we will post an update here as soon as we can.

Unfortunately I don't have a workaround for the issue at the moment, but I did notice what was happening. The collision is being spawned in for the mesh but it's being spawned in at the 0,0,0 location relative to the blueprint. You probably didn't notice this unless you you experiment with different sized meshes.

Cheers,

TJ

more ▼

answered Jan 28 '15 at 10:00 PM

avatar image

TJ V ♦♦ STAFF
41.1k 1009 183 493

avatar image Callan White Jan 29 '15 at 11:12 AM

Hello TJ,

After further testing I have found that the issue here was with my blueprint. The collision was spawned in at 0,0,0 because I was executing "Set Start and End" after executing "Set Static Mesh". I'm going to assume that "Set Start and End" when called on a SplineMeshComponent ,that has an attached StaticMeshComponent, only updates its rendering position and not the collision position, leading to the issue I was experiencing (i.e. visibility collisions were correct, but player collisions were not).

Regardless, thank you for the quick reply and your help on the matter; I now have an extendable and collisionable spline! alt text

ue.png (248.2 kB)
avatar image RyanGadz Feb 19 '15 at 02:41 AM

So my next question is: Does the collision still work in the packaged version of your game? Mine works fine in the editor but all collision disappears when I package it up (for Windows).

avatar image formatt Mar 11 '15 at 12:23 PM

I have the same problem. Works fine in the editor but if I choose to run it as "Stand alone game" my pawn goes straight through the ramp. Anyone else seen this? Actually, if I check the collision view in the editor there doesn't seem to be one for the spline although if I run it in the editor it actually collides.

avatar image TJ V ♦♦ STAFF Mar 13 '15 at 01:44 PM

Hi formatt,

Thank you for adding to the report. I updated the JIRA to show that additional users are experiencing this issue. Our developers are still investigating it and we will post back here with updates.

Cheers,

TJ

avatar image handy_tool_lover Feb 13 '16 at 12:02 PM

Hi,

just chiming in to say that if this was fixed soon for packaged games, I would be so happy.

My game's whole concept relies on spawning roads at runtime so I assume my options are to spawn a load of collision volumes to match the mesh or go into the source code and attempt to fix this myself.

avatar image Davision Jul 23 '15 at 08:17 PM

I can't get collisions working, even when using no set static mesh or doing it after the Set Start and End. It is only colliding at 0.0.0. Any update on the bug?

avatar image TJ V ♦♦ STAFF Jul 24 '15 at 02:15 PM

Hi Davision,

This is still an active JIRA in our system. It is however lower priority than crash bugs and showstoppers but it is still in the queue to be investigated as soon as possible.

avatar image TheAwesomeTh3ory Aug 16 '15 at 10:14 AM

Has this been solved? My entire project for the game jam this month won't work if this can't be resolved....

avatar image TJ V ♦♦ STAFF Aug 17 '15 at 05:43 PM

Hi TheAwesomeTh3ory,

This has not been resolved but the developers are actively investigating the issue. However, if a fix does go into place, it will likely be after Game Jam is over. Since there is not official workaround, I suggest altering your implementation to get past the issue.

avatar image Joe Conley STAFF Apr 12 '16 at 04:59 AM

Just FYI, the feature request UE-8565 to Support runtime generation of spline mesh collision on platforms that have runtime physx cooking enabled has been implemented in Perforce CL-2937854 by accepting pull request 2064. This change should make it to GitHub the next time the perforce stream it was added in is merged to main, and we plan to include that change in the 4.12 release.

Thanks!

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

Okay, phew, I've drilled down into the source and fixed this to my satisfaction. I'll submit a pull request to Epic and maybe save someone some time.

In the meantime, if you need this functionality, the solution is:

-Follow the instructions for downloading UE4 from github. This takes a long long while.

-Once Visual Studio opens make the changes in attached image

Changes for splinemesh collision in packaged game at runtime

-Continue building the engine and the editor

  • guess from here you create a new project and once you're satisfied that a packaged game can recalculate collision at runtime, migrate your old assets.

Happy programming!

capture1.png (151.9 kB)
more ▼

answered Feb 17 '16 at 07:43 PM

avatar image

handy_tool_lover
61 1 4 4

(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