Jump to content
Sign in to follow this  
jw custom

Get a postion in a direction based on 2 positions

Recommended Posts

2rqobi9.jpg

So i know position of the 2 blue dots my question is how do i find the position of the red dot 500m from the 2nd blue dot?

Thanks for any help :)

Share this post


Link to post
Share on other sites

And you can get the direction of the 2nd blue from the first (and as such the direction you need) with Bis_fnc_dirTo

Share this post


Link to post
Share on other sites

[color="#FF8040"]car [color="#191970"][b]setPos[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]getPos[/b][/color] [color="#000000"]player[/color] [color="#191970"][b]vectorAdd[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#8B3E2F"][b]([/b][/color][color="#191970"][b]getPos[/b][/color] [color="#000000"]player[/color] [color="#191970"][b]vectorFromTo[/b][/color] [color="#191970"][b]getPos[/b][/color] [color="#191970"][b]cursorTarget[/b][/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]vectorMultiply[/b][/color] [color="#FF0000"]10[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b])[/b][/color][/color]

Made with KK's SQF to BBCode Converter

This will position car 10m away from player in the direction of cursortarget

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
Sign in to follow this  

×