How reduce length of vector create by raycast after a hit
Hi, I made a prototyping of cover with a raycast hit which hit from forward of player to do a move to at this place. The issue is the player move exactly on the hit of raycast, so the character is in the wall/mesh. So i want to reduce the lenght of the vector after hit a wall/mesh to stop the player nexto to the wall/mesh. Do you know how do that ? Thanks Blueprint
(comments are locked)

yoanlesouder, try using the "Teleport" node to move your player's pawn. It will automatically correct position to account for walls and other obstacles.
(comments are locked)

The issue is that your collision is not set up properly. Examining the doc for the Thus we have a few solutions: 1. Correct the wall and player collision so that the proper location is returned (recommended) Check the collision on both the wall and the player meshes, and ensure there is ample space to represent the models. 2. As @Krxtopher said, use the Teleport node  it's kind of made for this 3. Offset the return vector along a line originating from the start location This is basic vector math, something everyone developing a game needs to learn. It is important to note that we are not dealing with traditional vectors, but a structure holding 3 values (X,Y,Z) called Vector3. A vector has a coordinate location and magnitude. Vector3 is simply a 3 space point. If we have Vector3 A, and we want to find Vector3 C along the line between Vector3 A and Vector3 B. The math for this follows in this math discussion: Instead of 2 points, x and y, you are dealing with 3. Good luck and happy mathing :)
(comments are locked)

Follow this question
Once you sign in you will be able to subscribe for any updates here