Setting a particle's angle based on the mouse
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Setting a particle's angle based on the mouse
---
Last edited by Dvondrake on Mon Jan 21, 2019 10:21 pm, edited 1 time in total.
Re: Setting a particle's angle based on the mouse
Oh s*** ... I checked the ParticleSystem source just now, and I discovered a huge mess with the degrees/radians conversions. Oh, well. That's what we get for speedcoding.
I'm considering whether we should change everything to radians. I would prefer everything in degrees (which is more intuitive), but we can't (shouldn't) change the standard Lua math library. That's for another thread, though.
Wiki: yes, it will come, but I haven't even started on it yet. I need to make a template for Dokuwiki, integrate it with phpBB and probably make custom plugins. It's a big project in itself.
I'm considering whether we should change everything to radians. I would prefer everything in degrees (which is more intuitive), but we can't (shouldn't) change the standard Lua math library. That's for another thread, though.
Wiki: yes, it will come, but I haven't even started on it yet. I need to make a template for Dokuwiki, integrate it with phpBB and probably make custom plugins. It's a big project in itself.
Re: Setting a particle's angle based on the mouse
I myself prefer everything in radians. The reason is that this is what is used after elementary school, and every single sin, cos, atan2, or any other trigonometry function i have ever come across uses radians.
But the problem is that it's so damn... non-intuitive... unless we teach every newbie that up is pi/2, left is pi and down is 3pi/2...
I guess if we always remember that everything in LÕVE is in degrees, and everything in Lua is radians, we'll be fine
But the problem is that it's so damn... non-intuitive... unless we teach every newbie that up is pi/2, left is pi and down is 3pi/2...
I guess if we always remember that everything in LÕVE is in degrees, and everything in Lua is radians, we'll be fine

Re: Setting a particle's angle based on the mouse
Could always make your own sin, cos, tan which uses degrees... But everything in radians will be more consistent; IMHO just add a function to convert between radians and degrees.
Re: Setting a particle's angle based on the mouse
math.rad & math.degappleide wrote:Could always make your own sin, cos, tan which uses degrees... But everything in radians will be more consistent; IMHO just add a function to convert between radians and degrees.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 2 guests