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"

Easy way to add hitbox/collision detection to existing static environment in map?

Hi! I'm wondering if there is an easy way to add collision detection/hitbox to existing static environment in map?

I have already created a blueprint that contains logic for collision and in viewport i have a box collision that i want to add on static elements in map but i don't want to add it manually to all trees, stones and other obstacles in my level, is there any easy way to do this?

Product Version: UE 4.17
Tags:
more ▼

asked Feb 15 '18 at 01:45 PM in Blueprint Scripting

avatar image

hussein.albreihi
1 2 2

avatar image ThompsonN13 Feb 15 '18 at 04:05 PM

what is your actual goal with all of this? if its just to have collision on the trees thats easy but if your looking to associate a script for when you shoot a tree then that becomes a bit more complex.

avatar image hussein.albreihi Feb 15 '18 at 07:39 PM

What i want to do is add a boxalt text collision around a i.e a tree, i already have a blueprint that has a script with what is supposed to happen if player hits that tree and in that blueprint in the viewport i have added a box collision.

The reason i want to do this is because i want to skip manually adding my box collider in the map manually to all trees and other static elements that i want to have a hitbox.

I did a test code that spawns my blueprint but it doesn't work quite well unfortunately.

What i did is i added a tag to some test trees in the map and i loop though them and spawn my box collider in their position but what happens is that my loop goes though them all and then adds unlimited amount of my hitbox to the last tree in that loop which is not what it is intended to do..

Hopefully this describes what i want to accomplish

blueprint.png (65.0 kB)
avatar image ThompsonN13 Feb 15 '18 at 11:30 PM

if your just looking to have a box collision on the trees then open the static mesh and add a simplified box collision. that will create a box collision for all the instances of that tree in the level.

also in the script you posted try deleting that delay node. its probably causing problems even if you dont see it.

(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