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"

real time partial collision detection

I wanted to know if there was an easy method to create real time collision cutting like in the game "A hat in time" for a side scroller game.

alt text

Because this game was made in UE3 I was wondering if there is an equivalent in UE4.

Product Version: UE 4.17
Tags:
collision.gif (1.6 MB)
more ▼

asked Dec 27 '17 at 02:15 PM in Blueprint Scripting

avatar image

Ikeiwa
25 2 7 10

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

1 answer: sort voted first

Hey! Creator and primary programmer on A Hat in Time here.

The above is achieved using 2 steps: code and visuals.

In code, we created a custom component with a point and radius. Then for specific objects (like the leaf in the gif), whenever the player collides, we check if the player is within the radius of any of the custom components - and if so, we allow the player to collide. Pretty simple, and doesn't require dynamically "cutting" the mesh.

For visuals, we pass the sum of all custom components to materials who ask for it (via a usage flag), and then the material just calculates per-pixel whether its within the radius - if so, appear solid.

Hope this helps!

more ▼

answered Dec 27 '17 at 07:15 PM

avatar image

MekuCube
21

avatar image Ikeiwa Dec 27 '17 at 10:00 PM

Woaw didn't think it was this simple. Thank you!

(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