{"author_name":"joecarrot","cat":"LD #25","comments":[],"epoch":1355602260,"likes":1,"metadata":{"p_key":"48939","p_author":"joecarrot","p_authorkey":"18779","p_urlkey":"84615","p_title":"Points added, guns now properly look at the mouse, and PARTICLES","p_cat":"LD #25","p_event":"LD25","p_time":"1355602260","p_likes":"1","p_comments":"0","p_status":"UPD5","us_key":"18779","us_name":"joecarrot","us_username":"joecarrot","event_start":"1355443200","event_key":"14","event_name":"LD25"},"text":"<p><a href=\"http:\/\/dl.dropbox.com\/u\/96086\/ld25\/ld25_v_0.0.html\"><img class=\"alignnone size-medium wp-image-204025\" alt=\"Screen Shot 2012-12-15 at 4.09.16 PM\" src=\"http:\/\/www.ludumdare.com\/compo\/wp-content\/uploads\/2012\/12\/Screen-Shot-2012-12-15-at-4.09.16-PM-300x229.png\" width=\"300\" height=\"229\" \/><\/a><\/p>\n <p><a href=\"http:\/\/dl.dropbox.com\/u\/96086\/ld25\/ld25_v_0.0.html\">http:\/\/dl.dropbox.com\/u\/96086\/ld25\/ld25_v_0.0.html<\/a><\/p>\n <p>I can never get particles to not look junky <img src=\"http:\/\/ludumdare.com\/compo\/wp-includes\/images\/smilies\/frownie.png\" alt=\":(\" class=\"wp-smiley\" style=\"height: 1em; max-height: 1em;\" \/><\/p>\n <p>&nbsp;<\/p>\n <p>Via this handy little script I sort of figured out:<\/p>\n <blockquote><p>#pragma strict<\/p>\n <p>&nbsp;<\/p>\n <p>function Update () {<\/p>\n <p>var gunPlane : Plane = new Plane(Vector3.up, transform.position);<\/p>\n <p>var hitdist : float = 0.0;<\/p>\n <p>&nbsp;<\/p>\n <p>var ray = Camera.main.ScreenPointToRay(Input.mousePosition);<\/p>\n <p>&nbsp;<\/p>\n <p>if(gunPlane.Raycast(ray, hitdist))<\/p>\n <p>{<\/p>\n <p>var targetPosition : Vector3 = ray.GetPoint(hitdist);<\/p>\n <p>transform.LookAt(targetPosition);<\/p>\n <p>}<\/p>\n <p>}<\/p><\/blockquote>","time":"December 15th, 2012 3:11 pm","title":"Points added, guns now properly look at the mouse, and PARTICLES"}