Try with the controller rotation.
Show me the character hierarchy with the arrow and arrow component details.
The arrow should be attached to the main capsule component.
Show me the character hierarchy with the arrow and arrow component details.
The arrow should be attached to the main capsule component.
There is a trick that I use. I don’t know if it can help, I’ll leave it there.
Put a simple arrow on top of the minimap (in the UI itself) and obtain the 2D rotation of the player or leave it static. (For example, in mmorpgs you have both)
Although the 3dRaven u shape allows you more control and is much better, such as changing color depending on the depth of a building, while my always shape does not allow you to do that.
The 3dRaven form is more useful, since if you enter a cave, or something underground, you can modify the color. Whereas my way you couldn’t and would have to have too many meaningless conditions.
Therefore, the 3dRaven shape will always be much better, since the arrow itself can have the responsibility of height as well as transform it and do everything you want independent of the UI. While my way you would have to nest too many queries to that UI and that would not be correct when delegating functions since you would inefficiently overload the UI.
Your arrow mesh is wrong. Notice in the view that the arrow is rotated 90 degrees from the X axis.
The direction will never line up if the source material is broken
It should look like this:
If you have rotation in your mesh after lighting up the arrow to the x axis then look at point 1.
I am unable to rotate it, and it is because of the function that we have created. If I disconnect the function from the tick and construct. I am able to rotate it.
If the function in the constuctorscript is rotating the arrow texture with an offset (note that the polygon mesh is facing forward) then it is already made with an error.
Rotate the original texture file until it points the correct direction or export the mesh and rotate it’s uv map, save and reimport.
It worked
TYSM
Just one more thing I want arrow to be in center of the lane.
Could you explain what you mean by this?
Should the arrow snap to the center of the road you are on?
Yes, you get it right.
That is a lot more complex.
You need to detect the closest road to the character and snap the arrow to the closest location on the spline that draws the road (im guessing it’s spline driven)
You would have to do a raycast pointing to the world down vector and check if you hit the road static mesh. Then you would need to find write an algorithm to find the closest point to it’s center line and snap the arrow to that point.
That was the solution I proposed to you at 17:36 of the video.
But believe me, the solution of having it in the world is much better.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.