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
1
Question by alx1 · Jan 14, 2017 at 07:55 AM · moving platformmoving-platform

Charecter not moveing with platform ( i know its been asked a million times)

i have an empty gameobject and parented to that is my platform both with rigidbodies both with gravity off and kinematic on. on the empty game object i have this code that parents the character to the empty gameobject at start and moves the empty gameobject forward. the platform moves with the empty gameobject but the player dos not.

 using UnityEngine;
 using System.Collections;
 
 public class moveplatform : MonoBehaviour {
 
     public Rigidbody emptyplatform; // empty gameobject
     public GameObject player;
     public GameObject empty; // same empty gameobject
     void Start() {
         emptyplatform = GetComponent<Rigidbody>();
         player.transform.parent = empty.transform;
 
     }
 
 
     void FixedUpdate() {
         emptyplatform.MovePosition(transform.position + transform.forward * Time.deltaTime);
     }
 }

my character has a rigidbody with gravity on and kinematics off. if i turn on kinematics the character will move with the platform but i cant walk around anymore. i just want my character to be able to jump on a moving platform and be able to walk on the platform as it moves. why is it so hard? if anyone can help, please explain it to me like I'm an idiot because I am one.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by redcap · Jan 14, 2017 at 08:02 AM

I asked a similar question a few hours ago and am still waiting on the solution. I can tell you your issue though. MovePosition can only be used if the gameobject does not have a parent. Or so it seems. So if your character is using MovePosition this is why they stop being able to move. What is the solution? I don't know and am eager to see if anyone answers this as well.

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 alx1 · Jan 14, 2017 at 08:14 AM 0
Share

the $$anonymous$$ovePosition is on the empty gameobject and has no parents, good to know though. 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

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

Moving Platform with delay not working 0 Answers

C# player rigidbody, permaTransfer and moving platform 0 Answers

Can't get platform to move to the other direction 2 Answers

How to make a moving platform? 2 Answers

Moving platform and friction problem 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