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 rfernandezmir · May 03, 2012 at 10:28 PM · collisionrigidbodycharactercharactercontroller

Problems with character controller

I'm developing a game that consists of two balls. One of the balls is the main player which is controlled by you and the other is the enemy that has an AI script and it follows the main ball. The problem is that when the enemy ball collides to the main one, it doesn't move, that's because of the character controller. But, on the other hand, if I deactivate it, the controls don't work. My question is: What am I supposed to do in order to be moved by collision without deactivating the character controller?

Here is the webplayer in order to see the bug: http://dl.dropbox.com/u/19201848/webplayer%20ballsgame/webplayer%20ballsgame.html

Thanks for your time and interest!

Comment
Add comment · Show 2
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 GC1983 · May 03, 2012 at 11:03 PM 0
Share

Your question is pretty vague and doesnt really make any sense.

"What am I supposed to do in order to be moved by collision without deactivating the character controller?" - to be moved? Do you mean that if the NPC runs into the PC, it should push it around?

From what I see, the AI object circles around the player object and occassionally moves close to collide with the player object, and then start circling it again. You dont have to have a CC on the AI object for it to work. That all comes down to the code you make for it.

avatar image Ampler Games · May 04, 2012 at 04:33 AM 0
Share

When I was first starting off with scripting I found that this helped me "http://unity3d.com/support/documentation/ScriptReference/Transform.Translate".

With these commands and things I basically put the get$$anonymous$$eyDown function on each direction with the W,A,S,D controlls. This also allowed me to put a rigidbody on it and it still worked fine.

Just make sure you create an empty game object and put the sphere inside it, then apply the movement script to the game object and the ridged body to the sphere.

Hope this all makes sence and hope it all works :)

1 Reply

· Add your reply
  • Sort: 
avatar image
-1

Answer by tekiro_devil · May 04, 2012 at 08:15 AM

I think I understand what your saying but unfortunately I don't know how to fix it, maybe I can clarify for others though.

pretty sure he means when the enemy contacts the player it doesn't push it because it's only told to move if the player controller moves it. So it stays rooted to the spot unless the player moves it. aka there's no "bounce" on the player only on the computer object

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 GC1983 · May 04, 2012 at 08:30 AM 0
Share

This is not an answer. If this is what they are saying, it doesnt move because its a CC. If it had a rigidbody, it could create something of a "bounce" because it was given physics properties. If you have two Character Controllers running into one another, they will not move each other. They will only stop due to collision detection through the CC.

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I make a Character Controller NOT collide with Rigidbodies? 3 Answers

Problem with rigidbodys and box collider 1 Answer

Prevent rigidbody being affected by character controller 2 Answers

Physics goes crazy when rigidbody collides with moving character controller 0 Answers

How to change CC script to Rigidbody script 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