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 Will 1 · Apr 28, 2010 at 10:41 AM · animationcameraphysicsgravity

Rotating FPC Causes Player To Pass Through Surfaces

Howdy all, I'm creating a game where at certain points the First Person Controller is animated to tip forwards and backwards, this creates an odd tilting camera effect as the player changes direction to give the feeling their guy is leaning through injury.

I've done this by animating a cube to tip and made it a parent object of my FPC (maybe an odd way of doing it but it was the only way I could get it so the FPC would still function correctly).

My problem is that as this happens the FPC will pass through the floor or wall if the player is very close to one.

Is there a method such as altering the FPC, change my animation technique etc that would stop this from happening. (Note: I can't just turn gravity off as there are points where my the character will fall).

Any ideas will be greatly appreciated. Many thanks, Will.

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

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by runevision · Apr 28, 2010 at 11:33 AM

Having a CharacterController as a child to something else that moves is never a good idea since the physics engine won't be able to detect the collisions.

I suggest you find another approach - for example you could animate only the camera to get the tilting effect you want, while you leave the game object with the CharacterController alone.

Comment
Add comment · 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
0

Answer by Will 1 · Apr 28, 2010 at 01:32 PM

Thanks for the input Rune but tilting the camera wouldn't achieve the effect that I was after.

I ended up simply animating the cube to lift up and move in the opposite direction of each tilt. Now no matter how the player is moving they won't breach the floor or a wall. Thankfully it works a treat.

Many thanks, Will.

P.S Great work on the Locomotion system, I will no doubt use it one day!

Comment
Add comment · 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

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

Physics not applying to the animated object after the animation ends ?! 0 Answers

Face object towards a "direction" Crazy Taxi style 1 Answer

how to show cursor on specific time? 2 Answers

Physics dont take place until animation is done? 0 Answers

Mouse looking combined with head bob animation. And key input to play animation 2 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