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 hillsy7 · Nov 15, 2017 at 10:51 AM · rigidbodyterraincolliders

Notional Map Boundaries and freezing Rigidbodies

Hi there,

....I’ve got the main chunks of my game coded and working. It’s a rough Desert Strike Clone and I’ve got a flying ship at fixed height, bullets, shields, refuelling stations and enemies, and a terrain painted out. Everything is working well, energy levels and HP go up and down, I have all the sliders I need to adjust gameplay, and I’m almost ready to start building the level completely.

Almost….

....I had a problem initially with the terrain collider, so I’d turned the whole thing off while I was developing. Now I’m trying to stop the ship flying into cliffs and such, I’ve turned off the “Is kinematic” option, locked the y (height) position, locked the x and z rotation (So just like desert strike, everything operates on a single plane). Initially, it seemed to work – a few test collisions with the terrain and the ship just stopped. However, once I started to move on and finish up the HP loss and death system, I hit huge problems.

....Now, whenever the ship gets hit, a couple of things happen. Firstly, it now has a permanent force applied to it so t continually moves – I don’t think this is going to be too bad as I’m sure I can sort out a workaround somehow using another collider to destroy the projectile before it actually connects with the non-kinematic one. Secondly, and more worryingly, getting his seems to break the position and rotation freezes I’ve put on the Ship. After a couple of hit’s I’m now pointed at the sky and crashing into the ground – after testing the terrain again I’ve discovered I can break the freezes there too if I persistently fly into the terrain and find shallow gradients to work my way up. The spin and Height issue is even more pronounced if I crash into a non-kinematic enemy – the ship almost immediately jumps to a different height.

....So, basically I’m guessing I’m doing something wrong at the fundamental design level. Should I be using something other than the physics engine to stop motion? Should I be fixing these things in the update function if parameters go awry? Have I got the wrong things as non-kinematic (Ship and enemies = non-kinematic, terrain and bullets = kinematic)?

....I’m sure these aren’t new issues – so any ideas?

....NB: the actual ship is encased in a box collider as I was hoping the flatter faces would stop rotation when collisions occur – the mesh for the ship just went everywhere as it’s a mess of oblique angles….

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

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

106 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

Related Questions

Rigidbody falling trough terrain 2 Answers

is it better to make one collider for a large landmass made of many tiles, or make each of the tiles have their own colliders? 2 Answers

OnMouseDown not firing if character isn't touching ground 0 Answers

Compound colliders, what is the best implementation? 0 Answers

2d sprite falls through floor 0 Answers


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