• 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 Calfa · Dec 16, 2013 at 11:33 PM · javascripttriggertransform.positionobject position

Char moves along moving platform, but gets stuck.

In first term, i'd like to say hello to everyone. Please excuse my english, since it's not my native language (original post was in spanish)

I've been building a platform game, to start testing different features.

At this moment, i'm working on a moving platform which describes some kinf of circle over a wall. Character is supposed jump on it to access next platform.

The point is that i'm trying to be able to stand over the platform without falling while it moves. I tried to set character coords according on platform's, but my problem now is that when i jump on it, i get stucked because char coords will allways be platform's.

 //This is inside a "OnTriggerStay"
 
 > if(hit.gameObject.tag == "plataformaGiratoria")
 > {
 > var coordPlataforma:posicionPlataforma = GetComponent("posicionPlataforma");
 > var coord_x:float = coordPlataforma._x;
 > var coord_y:float = coordPlataforma._y;
 > var coord_z:float = coordPlataforma._z;
 > transform.position= Vector3(coord_x, coord_y-4, coord_z);
 > }




Also, i'd like to ask about another issue. As far as i know, when a collider becomes trigger, object is not "solid" anymore, so that's what i do...(see picture)

alt text

Is that the right way to do it?

Only thing remains me to say is Thanksssssssss a lot for ur help.

dudas.jpg (201.9 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 YoungDeveloper · Dec 16, 2013 at 11:36 PM 0
Share

$$anonymous$$ost of the community is English speaking, it would be polite for everyone else to play by the same rules. But i accepted this question because it took you some time to create. Editing it in English would be the best you could do.

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Calfa · Dec 17, 2013 at 12:35 AM

Thanks!

and...

Done! :D

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

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

Portal doors and exits. Can you set up one script to handle tranporting of the character to the exit? 1 Answer

On Click, destroy object and any colliding object with the same tag. 6 Answers

Showing text near object 1 Answer

How do I loop my light animation is javascript? 1 Answer

How do I trigger events using color using JavaScript? 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