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 /
avatar image
0
Question by helloiam · Mar 26, 2013 at 03:21 PM · physicsspawnthrowfallfly

ObjectSpawner

I want to make an objectSpawner I already know how to make it, but I want to makewhen the objects are spawned that they fly over the screen like they are been throwed. And then after it goes slowly down.

So what I thought is a little bit about this.gameObject.rigidbody.AddForce and more about physics things, so...

Maybe you guys now what I mean, it must be a little like fruit ninja the fruit gets throwed, but mine must come down after the object are throwed.

Thanks guys for reading and helping!

Comment
Add comment · Show 3
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 sdgd · Mar 26, 2013 at 03:39 PM 0
Share

am I did that without any force

I just placed a sphere around -0.5Y axis and spawner at 0Y axis and if I had 0.2/s I got a pretty cool thrower if I spawned at about 1/s I got allmost nothing allmost none thrower.

but you you want just make on start add force axis Y 10, ...

something like that

doing just general directions

avatar image helloiam · Mar 26, 2013 at 06:03 PM 0
Share

Oke I will try it out but still if others have any suggestions give me some thoughts! ' Thank btw.

avatar image helloiam · Mar 26, 2013 at 06:48 PM 0
Share

The answer you gave is unfortunately not what I want. The thing is that it must go up in Y as of course but I want to have it like that Instiated object is getting pushed like "boom" and then it flies in the heaven and it goes slowly downwards.

1 Reply

· Add your reply
  • Sort: 
avatar image
2

Answer by robertbu · Mar 26, 2013 at 07:37 PM

It is a difficult to figure out exactly what you want from this discription. I'm going to make some basic assumption. Your camera view is the default looking toward positive Z, and you are using Rigidbody components. To go in random directions you can do something like:

 var v3 = Random.insideUnitySphere;
 transform.LookAt(transform.position + v3);
 var go = Instantiate(prefab, transform.position, transform.rotation);
 go.AddForce(go.transform.forward * 500);

To get the object to slow, up the Drag setting in the Rigidbody. If you want to limit some direction, you can manipulate the v3 before doing the LookAt. For example, if you only want them going up, you could:

 v3.y = Mathf.Abs(v3.y);

Or if you wanted to limit the upward velocity, you could do something like:

   v3.y = Mathf.Clamp(v3.y, 0.0, 0.4);
Comment
Add comment · Share
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

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

11 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

Related Questions

Nav Mesh Agent won't fall off the platform? 1 Answer

How do you aim towards mouse when two objects are moving? 1 Answer

Accurately lob an object at a target 1 Answer

Force to reach point 1 Answer

Bullets spawn behind plane? 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