{"id":1439,"date":"2012-11-13T01:04:25","date_gmt":"2012-11-12T22:04:25","guid":{"rendered":"http:\/\/unitycoder.com\/blog\/?p=1439"},"modified":"2013-08-30T10:43:26","modified_gmt":"2013-08-30T07:43:26","slug":"place-objects-on-space-with-mouse","status":"publish","type":"post","link":"https:\/\/unitycoder.com\/blog\/2012\/11\/13\/place-objects-on-space-with-mouse\/","title":{"rendered":"Place Objects on Space With Mouse"},"content":{"rendered":"<p><a title=\"start webplayer demo\" href=\"http:\/\/unitycoder.com\/upload\/demos\/PlaceObjectsOnSpace\/\" target=\"_blank\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1440\" data-permalink=\"https:\/\/unitycoder.com\/blog\/2012\/11\/13\/place-objects-on-space-with-mouse\/place_object_on_space_with_mouse_unity3d\/\" data-orig-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/11\/place_object_on_space_with_mouse_unity3d.jpg?fit=680%2C397&amp;ssl=1\" data-orig-size=\"680,397\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"place_object_on_space_with_mouse_unity3d\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/11\/place_object_on_space_with_mouse_unity3d.jpg?fit=680%2C397&amp;ssl=1\" class=\"alignnone size-full wp-image-1440\" title=\"place_object_on_space_with_mouse_unity3d\" alt=\"\" src=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/11\/place_object_on_space_with_mouse_unity3d.jpg?resize=680%2C397\" width=\"680\" height=\"397\" srcset=\"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/11\/place_object_on_space_with_mouse_unity3d.jpg?w=680&amp;ssl=1 680w, https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/11\/place_object_on_space_with_mouse_unity3d.jpg?resize=300%2C175&amp;ssl=1 300w\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" \/><\/a><\/p>\n<p>If you want to instantiate objects on empty space, you cannot use Raycasts (no colliders to hit).<br \/> But you can use ScreenToWorldPoint() with adjustable distance from camera.<\/p>\n<p>(Or you could put invisible collider there..and if you need to adjust distance, move the collider..)<\/p>\n<p><strong>Webplayer:<\/strong><br \/> <a title=\"start webplayer demo\" href=\"http:\/\/unitycoder.com\/upload\/demos\/PlaceObjectsOnSpace\/\" target=\"_blank\">http:\/\/unitycoder.com\/upload\/demos\/PlaceObjectsOnSpace\/<\/a><\/p>\n<p><strong>Download source:<\/strong><br \/> <a title=\"Download\" href=\"http:\/\/unitycoder.com\/download\/index2.php?link=301&amp;uid=un1t3c0d5r\" target=\"_blank\"> instantiateAtSpace.unityPackage<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you want to instantiate objects on empty space, you cannot use Raycasts (no colliders to hit). But you can use ScreenToWorldPoint() with adjustable distance from camera. (Or you could put invisible collider there..and if you need to adjust distance, move the collider..) Webplayer: http:\/\/unitycoder.com\/upload\/demos\/PlaceObjectsOnSpace\/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1440,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[4,3],"tags":[368,354,108,369,367],"class_list":["post-1439","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-demos","category-unity3d","tag-empty","tag-grid","tag-instantiate","tag-no-raycast","tag-space"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/unitycoder.com\/blog\/wp-content\/uploads\/2012\/11\/place_object_on_space_with_mouse_unity3d.jpg?fit=680%2C397&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1KTaT-nd","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/1439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/comments?post=1439"}],"version-history":[{"count":5,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/1439\/revisions"}],"predecessor-version":[{"id":2389,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/posts\/1439\/revisions\/2389"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media\/1440"}],"wp:attachment":[{"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/media?parent=1439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/categories?post=1439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unitycoder.com\/blog\/wp-json\/wp\/v2\/tags?post=1439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}