Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 Murtada58 · Jun 27, 2018 at 01:39 PM · collisiontriggerstime.timescale

Time.timescale fixed bad collision?

The problem is that initially the game had some collision problems especially at higher speeds however I was able to fix this because I tried adding a feature that would slow the game down and noticed that at a lower timescale the collision got worse so I increased the timescale to 10 and noticed that collision got a lot better(couldn't notice any errors at this point) and now I have it at 100 and there are no problems at all but I have no idea why this is so if anyone knows why or knows an alternative method to fix collision please tell me.I also use all the colliders as triggers in this game.


This is the game currently(Time.timescale = 100 when playing and 0 during pause or game over)

http://testgames58.tk/DDRgameV4/arrowgamev4.html


This is the previous version of the game(bad collision Time.timescale = 1 when playing and 0 during pause or game over)

http://testgames58.tk/DDrgameV3/arrowgamev3.html

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by NorthStar79 · Jun 27, 2018 at 02:01 PM

Hello, probably the main reason is; your scene scale isn't correct. you should consider 1 unit as 1 meter, if your objects are too small or too big, you can get errors like this. if you add screenshots from editor that shows how big your objects are we can tell much more. Also, probably you are moving your objects in Update() method instead of FixedUpdate(), if this is the case, move your movement code into FixedUpdate() and set your timescale to 1 again. if your objects are moving very fast you can decrease FixedUpdate Time step (Here a documantation)

I Hope this answer helps, good luck

Comment
Add comment · Show 1 · 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 Murtada58 · Jun 27, 2018 at 02:24 PM 0
Share

alt text

The camera size is 7 units and I have used 1 unit as 1 meter in all my calculations and the only thing concerning physics that that I have in the game is


rb.velocity = new Vector2(rb.velocity.x, GameController.currentspeed);


which I have placed in fixed update already. I have also divided all the values being used by Time.timescale to make sure that the game will always move at the same speed regardless of Time.timescale. I want to post my code here but I can't since both the arrow behaviour script(I have one for each arrow but the only differences are about the input so if I can I will only post 1 of them) and the game controller script both exceed the character limit.

unityarrowgame.png (143.6 kB)

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

140 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 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 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 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 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 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 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

Activate trigger if items colected 1 Answer

OnCollisionEnter When isTrigger = false 3 Answers

Ignore collisions with self but still trigger with self 2 Answers

Resizing colliders and OnTriggerEnter 0 Answers

change material when ontrigger 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