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 drulludanni · Dec 23, 2013 at 02:07 AM · collidertriggerplanestretch

Default plane collider doesnt work properly when stretched?

In my game you have the ability to shoot projectiles (capsule), these projectiles are supposed to explode when they collide with an object, however when shooting towards the ceiling (Plane) the projectile sometimes doesn't explode.

Up on further inspection I noticed that a certain face (triangle within the plane) of the plane does not trigger the explosion (I'm using OnTriggerEnter and have tried OnTriggerStay without any difference) but other faces do I also tried making the ray ignore the plane but that resulted in the projectile simply moving through it.

so I decided to make a new plane to experiment with it. when the scale was x:z = 1:1 everything seemed to work fine but when i scaled it up to 100:100 around 30% of the projectiles didnt explode and 70% did.

has anybody got an idea why this happens and how to fix this? I could probably just use a Cube with a box collider, but I was just curious why this happens and if it is possible to fix it.

Comment
Add comment · Show 4
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 supernat · Dec 23, 2013 at 02:14 AM 0
Share

Just to be sure, how are you creating the plane and collider? When you scale it, are you talking about the transform scale, and do you see the green collider box increase in size to match?

avatar image robertbu · Dec 23, 2013 at 02:20 AM 0
Share

This may not be the issue you think it is. Start by reducing fixedTimeStep to 0.01 from the default value of 0.02.

 Edit > Project Settings > Time

If this solves your problem, take a look at the many posts about keeping objects from going through things.

avatar image robertbu · Dec 23, 2013 at 02:29 AM 0
Share

While I don't think your problem is primarily the plane stretching, this script will allow you to make a plane of a specific size and as small as two triangles:

http://wiki.unity3d.com/index.php?title=CreatePlane

If you use this script, don't forget to add a mesh collider.

Oh and regardless of the plane you use, you can have a box collider on the plane if you want.

avatar image drulludanni · Dec 23, 2013 at 03:18 AM 0
Share

yes the plane has a collider, I'm able to stand on it (and as I said the Raycast function seems to work fine on it if there was no collider the Raycast wouldnt work right?), changing the fixed time step didn't change anything I'm using Vector3.$$anonymous$$oveTowards() to calculate where the projectile goes so it simply stops in the plane (and clipping through it so they should be triggering every single frame and even if I don't use move towards and simply make them move through the plane it ). If I pause the game and re-size the plane most of the projectiles go off immediately (even when paused) but some of them sometimes remain. It kind of must have something with the plane stretching i just did a test with the plane, a scale 1:1 plane and 30 shots gave 30 exploded a 1000:1000 plane 24 of 30 exploded surely that cant be coincidence (I also tried different shot angles but that didn't change anything).

thanks for the script though that could be useful later.

0 Replies

· Add your reply
  • Sort: 

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

19 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

Related Questions

Can't click gameobject when over another trigger? 1 Answer

Trigger-based vehicle ai? 1 Answer

Trigger Spawning? 1 Answer

Temporarily ignore collisions between player and enemies 2 Answers

Adding Sound To Collectable Object 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