Good day my friends , I apologize for my English (google )
But I have the following problem , I am creating a game cubes to assemble , and I’m having a problem with the linetrace .
This happening next .
I created a ActorBlueprint as follows.
A box with 6 hitbox around. when I click on one of them, another block would be created . however the linetrace only works if I’m just in the shipping box . see picture
I don’t understand “however the linetrace only works if I’m just in the shipping box”. Please give more details.
With “shipping box”, do you mean the green one?
Hi Juliojal,
can you send us a screenshot of your blueprint?
Could it be that that the hitbox is watching for a actor to overlap?
How do you use the line trace? The line trace won’t do anything (like triggering the hitbox) it will only return the actor that it hit, you have to add additional logic to it.
Regards,
Not sure if it will work, but you may try out this (if you don´t understand it i´ll recreate it when i´m home and show you a screenshot).
-
Line trace by Object (i think you know how to set up the vectors). Rightclick the array for the objects you want to detect. Add the BlockActorBP to it.
-
Get your players location - hit location → vector length. Subtract half the lengt of your actor from it and use this location to spawn another BlockActorBP.
Okay…forget the second part of the second answer. You´ll have to do some vector maths so the blocks don´t overlap.