Jump to content
mikkol

drawLine3D with curve? Or similar?

Recommended Posts

Hey there!

Is there any way to draw curved lines with drawline3d ? Or is there a better way to do that? in 3d space.

I'm trying to draw line from player to mouseposition with curve.

I can get straight line with this code:

{

_line = addMissionEventHandler ["EachFrame", {

    drawLine3D [ASLToAGL  eyepos player,  getpos  ML_Mouse, [1,0,0,1]];

}]};

Is there  a way to use bezierInterpolation  with drawLine3D?

Share this post


Link to post
Share on other sites

A quick search brought up this bit by @rejenorst. You'll probably want to convert it to a function as compile is problematic.

 

 

Share this post


Link to post
Share on other sites
1 hour ago, killzone_kid said:

https://community.bistudio.com/wiki/bezierInterpolation 

Literally 1st result in google for "bezier interpolation arma 3"

Hey killzone_kid! I know that command but My question was IS there a way to use that with drawline3d? ( Or Better way than drawline3d).Drawline3d uses start and endposition.  Sorry For asking stupid questions.  And yeah! I know how to Google but im not expert at scripting.

Share this post


Link to post
Share on other sites
42 minutes ago, mikkol said:

IS there a way to use that with drawline3d

you make a loop to iterate over interpolation result and draw many lines from point to point, you can set step as you wish for smoothness

 

Share this post


Link to post
Share on other sites

Yea! now i got it.  I was overthinking this. Haha! Thanks ! 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×