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 Strikerg2216 · Nov 01, 2013 at 04:43 PM · camerarotationmovement

FPS camera movement breaks GameObject

Dear Friends I do wasted alot of time to solve this one stupid thing with this First Person Controller Camera.

I have a weapon that contains alot of parts in it that are parented to weapon. And weapon is parented to Camera inside FPS controller.

Here is the deal (And it not happens when I parent it outside the camera) :

When I run the game preview everything is alright while I move camera horizontally but when I move it verticaly the all parts from "weapon" just gets messed up. they do move in needed direction but each on their own and they all clip through each other. The picture looks very bad from this point.

Only happens with this camera and only if anything is parrented to it.

Please can anyone describe this problem as it is. And explain how to solve it. And I did look though all the advices currently on these forums and didn't find simple solution to this.

Thank you.

I attached the image from my most recent tutorial area for testing out stuff. Here you can see the problem (and here Is no scripts placed by me so they cant be the reason) alt textalt text

totally not right.png (505.3 kB)
normal.png (521.7 kB)
Comment
Add comment · Show 29
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 sethuraj · Nov 01, 2013 at 04:54 PM 0
Share

try putting every parts of the weapon under an empty gameobject and parent the empty gameobject to the camera.Or at-least show the hierarchy view

avatar image Strikerg2216 · Nov 01, 2013 at 05:46 PM 0
Share

alt text

Here is your image. But I have already writen that i did exactly as you said. Nothing has changed.

hierarchy.png (160.6 kB)
avatar image Dracorat · Nov 01, 2013 at 06:12 PM 1
Share

When you run the game in preview mode, select something like "Blade" - all its transformation etc info in the Inspector should remain 0 0 0 as you look around. Does it?

avatar image Strikerg2216 · Nov 01, 2013 at 06:17 PM 0
Share

Yes, It's quite interesting but It does stays the same for x,y and z.

avatar image Strikerg2216 · Nov 01, 2013 at 06:21 PM 0
Share

Let me describe thing more properly..

It happens with all parts of any object. Only happens when you move camera up or down in preview mode. And last as you can see from the images when camera goes up the object also get further from it so the camera doesnt center with the object but ins$$anonymous$$d orbits around it. But while it does all parts goes right through each other.

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by darkhog · Nov 02, 2013 at 06:09 PM

I probably say this blindly (without access to code you are using), you should only move/rotate root of the object (Melee), not any of the others. Also, in case if you are using physics colliders, make sure weapon parts doesn't collide which each other. There is API call for that:

 Physics.IgnoreCollision(collider1, collider2);

Make sure that conected object doesn't clash with each other.

Also, seeing code you use both for moving weapon and fps camera will be REALLY helpful.

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 Strikerg2216 · Nov 02, 2013 at 06:23 PM 0
Share

It sounds kind of blindly. But logicaly. But the problem is I removed all colliders from each part. and even if I try to do any transformation with just parent object and not its child the effect stays the same.

avatar image
0

Answer by Strikerg2216 · Nov 03, 2013 at 11:27 AM

Yup the mistery is solved, finally... I was seriously right when I said its all because of naming. Everyone who has similar problems look here When you name any child or parent object before parenting you will have different camera distortions , dont know why, dont care. So here what you need to do - Before adding any objects or renaming Empty object place it as you like then whyle its still Empty Object parent it anywhere you need then add child objet to it and only then rename it. Step - by - Step

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

18 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Camera Relative Movement 2 Answers

Script that stays behind player that rotates the player along with the camera/mouse (third person) 0 Answers

(2d in 3d) Movement relative to camera using JS 0 Answers

Camera behavior the same as the unity editor has 2 Answers

Orient GameObject rotation to rotation of Main Camera 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