Thursday, March 28, 2019

c# - How can I draw a line of certain length and direction?


I want to create a line of certain length and direction.


What I mean by this is drawing a line from Point A to Point B. Normally in Unity C# to draw a line from Point A to Point B is simply:


Debug.DrawLine(point_A, point_B);

The diagram would be something like this



A----------------B

But I dont want something like this, I want it to draw from Point A to Point B but with a certain length. So I am guessing I need the direction for this to work. But I don't know how to code it.


Here is a basic diagram of how i want it.


A--------        B


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...