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 Daryn · Aug 13, 2012 at 09:58 AM · objectplatform

Passing through an object

Alright so in my game there is a ball, a paddle, and bricks. I am making a brick breaking game and have the problem of after the ball bouncing around alot especially from higher heights it phases right throught my platform instead of bouncing off. at first i thought it was my speed so i put some speed limitations on it but even going slow it does it. can someone please help me?

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Ingen · Aug 13, 2012 at 11:34 AM

Hi, I hope this can help you

http://wiki.unity3d.com/index.php?title=DontGoThroughThings#C.23_-_DontGoThroughThings.js

Comment
Add comment · Show 4 · 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 Daryn · Aug 13, 2012 at 07:17 PM 0
Share

This is definitly useful and helpful to know but it only applys when objects are going to fast and that is not the case here

avatar image Ingen · Aug 15, 2012 at 05:49 AM 0
Share

maybe U can use add Force, ins$$anonymous$$d physics bounce, the problem is how calculate the angle of collision, and based on it the angle to the of the ball must go

I hope is understandable

avatar image fafase · Aug 15, 2012 at 05:55 AM 0
Share

If you are doing an arkanoid game, I would not recommend AddForce which is going to add force (as the name implies) and then slows down. Flipper game would do just fine but Arkanoid needs a constant speed. You'd rather use

  rigidbody.$$anonymous$$ovePosition(rigidbody.position + velocity);

and the velocity being calculated at the collision:

  velocity.x = velocity.x - 2 * norm.x * Vector3.Dot(velocity, norm.normalized);
  velocity.z = velocity.z - 2 * norm.z * Vector3.Dot(velocity, norm.normalized);

that is if you have your level on the z and x axis which is likely. velocity.y being always 0.

avatar image Daryn · Aug 16, 2012 at 01:31 PM 0
Share

I was using addForce already ins$$anonymous$$d of physics bounce and have been looking for a way to get constant speed so thank you. and also with how i have it now it automaticaly works the angles correctly .

avatar image
0

Answer by speedything · Aug 13, 2012 at 11:36 AM

This is going to be one of those annoying issues where things that usually work occasionally don't!

You're going to have to do some bug testing to narrow down the problem. You've started to think about this by looking at the speed, but other things you should check are.

  • Add a Debug.Log to the collision so that you can see if the collision is triggering or not.

  • If you launch a new ball after the first has phased-through, does this one work ok or not? If its ok then the problem is probably with the ball. If it isn't it's probably the paddle.

  • If you remove all the bricks and just bounce it, does it go wrong then? If so then the bricks aren't involved with the problem.

Check these things out and see if you can narrow down the issue. As it stands its too open a problem with too many things that it could be.

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

10 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

Related Questions

2D runner, need a help 0 Answers

Move an object from A to B to C etc.? 2 Answers

Show object for a specific platform only. 3 Answers

Possibility to change in-game scenes (spawning objects / changing background) by killing opponents / dialog options 1 Answer

Platform dependent flags required in Using/Namespace definition? 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