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 MK7 · Apr 26, 2011 at 04:08 AM · raycastcollideraxisrotatearound

Rotatearound Collider axis

I'm looking for in the long run is essentially a sort of "hinge" effect using rotate around. When the player looks at a wall & presses a button the world around the player rotates 90 degrees using:

the player as the point

&

*the specific walls forward/backward or up/down axis (depending on whatever wall the player is directly looking at)

I want to use a ray that is being cast from the player to determine which walls axes will be used by my rotation script since I have a fairly large number of walls, but I don't know how to do this.

alt text

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 Cyb3rManiak · Apr 26, 2011 at 08:54 AM 0
Share

Can you try and make it a bit clearer? Break it down. It will help to understand what you want better... Do you want to rotate the first person controller around the object? Do you need it to move around the hit object? Or just face it? Do you want the first person controller's local rotation to change based on what the ray hit?...

avatar image MK7 · Apr 26, 2011 at 01:03 PM 0
Share

yup sure thing.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by synapsemassage · Apr 26, 2011 at 12:48 PM

The easiest thing I can think of is to make the collider object (dummy), that is hit by the ray cast, a parent of your first person. Then rotate the dummy. Your first person will rotate properly (follow) because it's a child of your dummy. When rotation ended you can unparent again if needed. Repeat this as needed on other dummies. Hint: You might want to reset the dummie's rotation to avoid rotation mess if dummy is hit another time by ray cast starting the procedure another time.

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 MK7 · Apr 26, 2011 at 01:05 PM 0
Share

I attempted to clarify my question since this doesn't seem to be what I'm looking for.

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

No one has followed this question yet.

Related Questions

raycast not colliding 1 Answer

How to make an enemy always face the player.? 1 Answer

Checking raycast hit on tagged collider- "Cannot implicitly convert type 'string' to 'bool'" 1 Answer

RaycastHit2D hits "itself" 3 Answers

How to make the player jump down from the platform 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