Line Trace by Channel against Box Collision - Problem
Hi Guys... I am trying to learn UE4 currently and made already some interesting learnings.
But now I have a problem which I can not solve alone... I am trying to make a tree which grows by time and if he reached his max size spawns other small trees randomly next to him. It is nearly working.
I gave the tree blueprint a tree model component and a box collision component (which should be used for detecting regions where the tree may NOT spawn) I calculate a random position within a min and max radius and than take this position + z 800 to make a line trace to the target position to calculate if one of the tree collider was hit (there is a own trace channel for this purpose, and the collider is set to block this trace channel)
But the trees even spawn in this collider :( I already tried a lot of stuff maybee someone of you could help me?
what i would suggest you to Debug you collision is simply to link a function or a custom event in your event tick serie of node to allow you to display via UMG or even via Text component added on your Tree blueprint and get the collision channel and response from your object. It quite simple and it will allow you to check immediatly what is the channel and setting of your current actor collision.
Keep the good work !
answered Mar 26 '15 at 10:21 AM
However, looks like this does not work with certain channels only. For me in my project only one 'problematic' channel appeared: the only one trace channel did not work, while other custom Channels were blocking the trace as expected.
The solution in this case for me was just to create a new custom trace channel and assign it to the LineTrace function and to component's Collision settings as Block.
answered Mar 30 '15 at 12:37 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here