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 /
  • Help Room /
avatar image
0
Question by sebbaraca · Oct 13, 2015 at 05:48 AM · fpscontrollerplatformboat

Character controller not moving with parent (boat)

Hi,

So I'm doing this project where I've got a boat and I place a character on the boat. The character is set as child of the boat so I expect it to move along with it when it accelerates.

alt text

The problem begins there, the character stays in place as the boat moves forward and then it falls off the boat.

I tried placing any other object with a rigid body on the boat a it moves along it, but I've got no luck with any character controller (Neither 1st or 3rd person)

The boat moves by adding force on it's rear part.

Any Help on this?

Thanks

captura.jpg (327.5 kB)
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 sebbaraca · Oct 13, 2015 at 05:52 AM 0
Share

Btw the FPSController character is set as $$anonymous$$inematic as suggested on other forums but I've got no luck.

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by golaod · Jun 09, 2021 at 07:55 PM

It's an old topic, but I just had the same issue. I moved my old project to new unity and new render pipeline system and same script, same player and same platform stopped working.


After checking all the topics with rigidbody, OnTriggerStay, position correction and so on, I found out that there is 'auto sync transforms' option which was not enabled in my new project. When I reenabled it, things went back to normal. (Edit -> Project Settings -> Physics (or Physics 2d) -> Auto Sync Transforms

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 bubzy · Oct 13, 2015 at 06:38 AM

you could have a state where the player is in the boat, if he doesnt move at all like

 if (enteringVehicle) //or however you want to implement this
 {
 Destroy(Rigidbody);
 }
 
 if(leavingVehicle)
 {
 gameObject.AddComponent("Rigidbody");
 }


or

http://docs.unity3d.com/ScriptReference/Rigidbody-isKinematic.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 sebbaraca · Oct 13, 2015 at 06:58 AM 0
Share

Actually I want the player to walk on the boat while it moves, so this solution doesn't work. Also the player must remain at all times on the Boat, so he never really leaves the boat.

About the $$anonymous$$inematic it doesn't works on the regular FPS controller. I just made it work on RigidBodyFPSController. Now the problem seems to be how to change the state when I want the player to $$anonymous$$ove and keep it on $$anonymous$$inematic when I want it to stay still on the boat.

I know I have to use m_RigidBody.is$$anonymous$$inematic =true/ false; and I'm working on it Right now, any ideas?

Thanks!

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

34 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 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

need help with using UFPS to control a ship 0 Answers

FPS Controller 1 Answer

FPS Microgame Moving Platforms 0 Answers

How could I make a fps touch controller? 0 Answers

Rigidbody.velocity control the speed and slow down the speed with mobile platform input Like Button Handle 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