AnswerBun.com

How do i draw a ray in unity

So i am trying to scrap together something for vr in which the locomotion is about the player holding the direction where he wants to go to(basically planning what he is going to do)while holding down the button a ray is beeing drawn and when the player lets go the character moves until he reaches the end of the ray i tried looking up something but couldnt find anything regarding something like this

Game Development Asked by Levent on January 7, 2022

1 Answers

One Answer

The component you are looking for is the LineRenderer. While you can use it to visualize paths in 3d space with as many points as you want, it is just as well possible to use it to draw a simple two-point line. You can use materials to customize its appearance.

Answered by Philipp on January 7, 2022

Add your own answers!

Related Questions

Compute shader: Property at kernel index is not set

1  Asked on November 2, 2021 by glen-pierce

   

How can I cast light onto a sprite in 3D environment?

1  Asked on November 2, 2021 by vern-rowan

   

How to run skactions randomly

0  Asked on November 2, 2021 by why25

   

AntiGravity Vehicle?

1  Asked on November 2, 2021 by roswell

   

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved.