Fist Posted October 11, 2018 Share Posted October 11, 2018 I can't figure out on how i can add z calculations for getPointFromDistanceRotation function from useful functions in wiki. Function is like this function getPointFromDistanceRotation(x, y, dist, angle) local a = math.rad(90-angle) local dx = math.cos(a)*dist local dy = math.sin(a)*dist return x+dx, y+dy; end but i need to add a z value as well, so it calculates how far z should go from original position to distance and angle. Anyone can help? Link to comment
Discord Moderators Pirulax Posted October 13, 2018 Discord Moderators Share Posted October 13, 2018 I'm just lazy to explain that :~, but trust me, it's just some geometry and trigonometry, simple :~. Link to comment
Fist Posted October 14, 2018 Author Share Posted October 14, 2018 yeah i already managed to do it. I just used wrong angle that's why i couldn't get it but thanks anyway! Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now