AnswerBun.com

How do i draw a ray in unity

Game Development Asked by Levent on January 7, 2022

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

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

Instantiate random different gameObjects in specific spaces?

1  Asked on November 2, 2021 by hapk

   

Gradual strafe rotation with focus on mouse (circle-strafe)

2  Asked on November 2, 2021 by lacklustertoady

       

Tile map click to walk UX

1  Asked on November 2, 2021

       

NiftyGUI – Text isn’t rendering

1  Asked on November 2, 2021 by ben-steffan

       

Move player in a circular manner

1  Asked on November 2, 2021 by renan-valentin-ferreira

   

Player hitting bottom of tile when beside it?

1  Asked on November 2, 2021 by mushrombrother-jpg

   

Ask a Question

Get help from others!

© 2023 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP