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 Toy · Feb 25, 2012 at 03:14 AM · rotationcolliderfpsslide

Collider not responding to my actions

Hi there, im making a game where my character slides ( rotation 90 deg ) everytime I press right Click.

The problem is that my collider dont follow my action. The collider stays straight up. I want the collider to rotate just like my character.

I have been searching and searching but nothing. I tried lot of things..... Is there a way to solve this problem.

Thx

Comment
Add comment · Show 1
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 Blazor Ramone · Feb 25, 2012 at 06:15 AM 0
Share

I don't think there is a way to change the orientation of the collider for the built in character controller, you could in script try to make it smaller when you are sliding i.e. adjust the radius height and center values http://unity3d.com/support/documentation/ScriptReference/CharacterController.html

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by jaised · Feb 25, 2012 at 06:11 AM

If you want your collider to perform with Physics you need to add the Physics elements to them. I'm not going to write your code, but here is what you need to do.

If using CharacterController: Apply a RigidBody to whatever you want to be interacted with, and when your collider runs into that RigidBody, the ControllerColliderHit() will be called. In there apply a force to the rigidbody.

If using RigidBody: Apply a RigidBody to whatever you want to be interacter with, and since your collider is a rigidBody as well, the Physics engine should take care of the rest.

You can modify which axes can be frozen if you don't want them to be rotated about. Hopefully this points you in the right direction:
http://unity3d.com/support/documentation/Manual/Physics.html
http://unity3d.com/support/documentation/ScriptReference/Rigidbody.html
http://unity3d.com/support/documentation/ScriptReference/ControllerColliderHit.html

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 Toy · Feb 25, 2012 at 09:41 PM 0
Share

Ok thx Ill try this.

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

7 People are following this question.

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

Related Questions

Problem with wheelJoint2D car rotations - my car needs to be able to do double jumps and mid-air rotations. 0 Answers

Rotation of the mouse activates a boxcollider2d in javascript. 1 Answer

Collider closestPointOnBounds returning point that is not touching the collider 2 Answers

Character Controller slides sideways when it hits objects are angles different from 90 degrees 1 Answer

c# bullet holes appearing on collider 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