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
-1
Question by Wesley · Jul 14, 2010 at 07:22 PM · collisionphysicsspawning2d-gameplay

physics for 2D game

I have a character controlled object that moves 1 unit up, down, left or right depending on the arrow keypad. I am not using gravity for this object, but when in runs into a solid object it starts to float in 3d space. If I make it kinematic, it goes right through objects. I want it to simply collide with the objects but not start floating, what's the best way to do this?

Comment
Add comment · Show 1
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 qJake · Jul 14, 2010 at 07:55 PM 0
Share

And I need you to not ask so many questions in one post. Read the FAQ in its entirety: http://answers.unity3d.com/faq And next time, ask one, specific question in your post, that someone can answer for you. "How do I...?" questions are good questions to ask, so long as you make them as specific as possible.

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Gary · Jul 15, 2010 at 12:57 AM

I am not sure what you mean by 'it starts to float in 3d space'. I assume 2D game is simply a 3D game with camera held fixed in a 2D plane, so everything is in 3d space anyway. If I understand correctly you wish to control this object precisely, but the moment you collide it with another object it bounces away in opposite direction thanks to physics... is this what you mean by float in space ?

If that is the case maybe you can start with 'Is Kinematic' disabled initially and enable kinematic after the collision has taken place and then control it precisely through your script? You will need to detect the collision through your script of course. And maybe then you can again disable kinematic? This might trick it into holding the object in place after the collision. Also maybe you can increase the mass of your object to some really high number to prevent it from bouncing off into space. I don't know if this will work but all I can think of..

Comment
Add comment · Show 2 · 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
avatar image Gary · Jul 15, 2010 at 01:01 AM 1
Share

Also this might come in handy : http://answers.unity3d.com/questions/1548/how-do-i-detect-a-collision-without-affecting-the-physics

avatar image Wesley · Jul 15, 2010 at 01:12 AM 0
Share

Yes that is what I meant, thanks for the advice, I just have to find the right script I guess.

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

No one has followed this question yet.

Related Questions

take control over particles 0 Answers

How to setup character Collisions? 2 Answers

Why Does Object Keep Getting Faster? 1 Answer

Audio for colliding blocks 0 Answers

How can I make a physics object jump a given height on collision regardless of current velocity? 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