Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Feb 27, 2014 at 06:01 AM by robertbu for the following reason:

UA does not write nor find script to specifications.

avatar image
0
Question by Hydropulse17 · Feb 27, 2014 at 05:54 AM · 2dinstantiatemousepositionworldtoscreenpoint

Instantiate at mouse in empty space 2D

I've read a bunch of threads on this but I can't get them to work. I have a Ship prefab, that the main camera focuses over. When the ship is destroyed, the camera gets confused and logs an error. I want to be able to create another ship where I click. This seems silly for a game, but my college instructor said that there needs to be mouse input for the project, so this is what I wanted to do for that.

I need the script, but also need instructions on how to use it. For the other scripts I've found elsewhere, I just attached them to the camera because I wasn't instructed otherwise.

Comment
Add comment · Show 6
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Hydropulse17 · Feb 27, 2014 at 05:49 AM 0
Share

If I have to, I'm willing to create an invisible plane underneath everything. Some others mentioned something like that. Detailed instructions though please.

avatar image robertbu · Feb 27, 2014 at 06:00 AM 0
Share

This site is not for people to write a script for you and then give you instructions on how to use it. This site is to help you script your own solutions. You are now seeing the problem with trying to build an app using found scripts. Sooner or later you run into a problem that will require either modifying the scripts or writing a new script.

As for solving your problem, almost all camera scripts that follow or focus on a target have reference in the script to that target. You are destroying the object that is the 'target' for the camera. You have two main choices:

  • Learn how to dynamically assign a new target to the camera. You may also have to modify or disable the camera script during the time there is no target.

  • Change your script so that you ship is not destroyed but is ins$$anonymous$$d reused. Again you may have to modify or disable the camera.

avatar image Hydropulse17 · Feb 27, 2014 at 10:15 PM 0
Share

That wasn't even my problem, actually, that was something I mentioned. And by co$$anonymous$$g on here and abusing your power like all moderators, you have not helped me at all in my VGD career, rather you have stolen an opportunity for me to learn for no good reason, and you've pissed me off. To further exert your power, I suspect you'll ban me, as opposed to swallowing your pride. So fuck you, I'll look for help on other forums. Thanks.

avatar image robertbu · Feb 28, 2014 at 12:50 AM 0
Share

I'm sorry you were angered by closure of your question. No one is going to close your account just because you disagree with a closure, but before you make broad allegations and be abusive, you should make an effort to understand why your question was closed. Every forum is different with both explicit and implied rules. Primarily this line in your question sealed its fate:

I need the script, but also need instructions on how to use it.

This is a hot button issue on this list since we have a lot of students and non-programmers trying to get the participants on this list to write code for them rather than take the time and effort to understand coding and concepts and so they can write the script themselves.

In addition, while you claimed to have "read a bunch of threads." You did not bring anyting to the table. The question of how to find a world position given a mouse click has been answer 1000's of times on this list. It is two lines of code (not a script) if the camera is axes aligned. It is five if the camera is at an arbitrary angle. Showing us your attempts to use any one of the 1000's of posts, whould have had your question accepted.

Finally, your comments about 'scripts found elsewhere' indicated that you are trying to build your apps by taking ready-made scripts and attaching them without understanding how they work. Again, this list is about helping you write your own code, not about ready-made scripts.

As for other forums, I occassionally find Unity questions answered on StackOverflow. Also there is a sister site to UA: Unity Forums. They have a discussion format. Good luck on your project.

avatar image Hydropulse17 · Feb 28, 2014 at 04:34 AM 0
Share

I'm so sorry, I feel like a jerk now. I know you were just doing your job. I guess I was already having a bad day, sorry if I ruined yours. I'll never blatantly ask for script again, besides, now that I think of it, that does seem kind of self centered.

Show more comments

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Instantiate gameobject at mouseposition 2d 2 Answers

How to get bullet to fire at set velocity? [2D] 1 Answer

Create objects on a mouse click in 2D 1 Answer

How in the world do I ACCURATELY place an object at the mouse? 3 Answers

Instantiating Child - Prefabs 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges