• 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
Question by Mahamed9628 · Dec 18, 2011 at 07:21 PM · collisionmovementrigidbodycharactercontroller

My character can stop movement of the Death Star!

Hi! Player has jedi's power in my game... but I dont want it. Problem I have described in my last question is still topical. But not totully. Let's take a situation: one rigidbody (its big spaceship) moves to my character (that has character controller), rigidbody is big and heavy, but my small character stops it! How to avoid that? Help please.

Comment

People who like this

0 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 FLASHDENMARK · Dec 20, 2011 at 02:40 PM 0
Share

A Rigidbody cannot "push" a Character Controller by default. You will have to write your own way of making a rigidbody "push" a Character Controller.

avatar image BerggreenDK · Dec 21, 2011 at 06:46 PM 0
Share

"My character can stop movement of the Death Star!" - I just hate it when that happends. :o) My question is, where was your hero when they had the trouble in Star Wars?

avatar image Mahamed9628 · Dec 22, 2011 at 10:44 AM 0
Share

Its just scandalous title, my game is set in my own universe, not in Star Wars. :)

avatar image Mahamed9628 · Dec 22, 2011 at 03:19 PM 0
Share

Ok, thanks everyone, I solved the problem with changing Controller to a rigidbody. It's very helpful link: http://www.unifycommunity.com/wiki/index.php?title=RigidbodyFPSWalker And now we're going to organise messy battle inside falling Death Star! :}

2 Replies

  • Sort: 
avatar image

Answer by Mahamed9628 · Dec 19, 2011 at 06:39 PM

Have you read my question? ok. Spaceship has rigidbody. My character has CharacterController. And why I should set isKinematic to true? My ship should be able to get influence of gravity, various forces etc. Mass of my shuttle is about 14000 kg. Also I tried to add that code to my character:

function OnControllerColliderHit(other:ControllerColliderHit){ if(other.rigidbody) cVec = other.rigidbody.velocity; } It really works and I can walk inside the ship, but I still can stop it.

Comment
Thom Denick

People who like this

-1 Show 8 · 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 Thom Denick · Dec 19, 2011 at 06:45 PM 0
Share

You should reply to Answers via comment, not by adding a new answer. Anyway, in order to help you we need a visualization of what's going on. Otherwise we're just throwing guesses out. Show us some screenshots, specifically your rigidbody/collider settings on the two objects.

As suggested below, if your Player is stopping the ship, it could be that the Player is set to being Kinematic. If that doesn't do it, try removing your Player script entirely and see if the ship can run it over. If that doesn't do it, it's almost definitely a setting in either your ship or the player Rigidbody or Collider.

avatar image Mahamed9628 · Dec 20, 2011 at 10:49 AM 0
Share

Ok, I'll make a video. But I can't understand: You don't read what I wrote? How can I set player to kinematic if it has CharacterController (not rigidbody)? I repeat you: Ship - rigidbody, player - characterController. But get back to business; it would be ok if player could stop ship anyway, but there is one exception. If I'm standing on the floor, ship could fly up! Its the same thing as standing near wall and trying to fly forward, but if I'm standing near wall and trying to fly forward, then ship STOPS. Attention: don't look at the graphics while watching the video, I didnt work with it. ;)

avatar image Scribe · Dec 20, 2011 at 10:57 AM 0
Share

Surely for the character to be effected by gravity you have to have both a rigidbody and the CharacterController attached to the player, so you should have a rigidbody on your character, so if you dont at the moment add one and change the masses of the rigidbodies etc

avatar image Mahamed9628 · Dec 20, 2011 at 11:35 AM 0
Share

Rigidbody and character controller at the same object? o_O Sorry, its new for me. I used to think that there should be only one. Ok, I'll try to make hybrid, but what about issues with hybridisation? For example, I use function Move() of the CC and character also gets affected by forces...Anyway, thanks for note :)

avatar image Mahamed9628 · Dec 20, 2011 at 02:36 PM 0
Share

http://www.youtube.com/watch?feature=player_detailpage&v=H8D3EB8eLDg

http://www.youtube.com/watch?v=NLanxu_8coQ&feature=mfu_in_order&list=UL

That's the video

Show more comments
avatar image

Answer by gregzo · Dec 18, 2011 at 07:54 PM

Have you attached a rigidbody component to the ship? Played around with masses? Last resort, on your ship's rigidbody, set isKinematic to true, it won't budge even if a planet hits it. Or maybe it's your character's rigidbody that is set to isKinematic?

Comment

People who like this

0 Show 0 · 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

Unity Answers is in Read-Only mode

Unity Answers content will be migrated to a new Community platform and we are aiming to launch a public beta by June 9. Please note, Unity Answers is now in read-only so we can prepare for the final data migration.

For more information and updates, please read our full announcement thread in the Unity Forum.

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

Using rigidbody for collisions only, not movements? 1 Answer

Rigidbody Version of RotateAround 2 Answers

isKinematic object doesnt collide with wall 1 Answer

Why does my character fly upwards when I click play? 1 Answer

Physics AddForce reduced when 3 objects are colliding 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