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 user-8010 (google) · Jan 19, 2011 at 04:09 PM · y-axisrestrict

Restrict Y axis

Hi Guys,

I have 2 cylinders. i add a force to cylinder1 on mouse click. When this cylinder1 hits cylinder2 it first hits cylinder2 and cylinder2 jumps in y direction, meanwhile cylinder1 gets past below this cylinder2.

Whereas i want it to collide cylinder2 and then cylinder2 should move according to the hit direction but should never move in y direction(jump)

Plz help

Comment
Add comment · Show 5
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 DaveA · Jan 19, 2011 at 04:19 PM 0
Share

$$anonymous$$ore info please, can you post any code? Are you trying to do this just with physics or is it a script?

avatar image user-8010 (google) · Jan 19, 2011 at 04:35 PM 0
Share

I am only adding force. No transform modifications via scripts...

Ex: There are 2 pucks(air hockey). I added force to puck1 and when puck1 hits to puck2.. puck2 jumps a bit in y(no rotation) and puck1 goes through from below it... plz help

avatar image Jeffom · Jan 19, 2011 at 05:37 PM 0
Share

well, then maybe this is youre problem. depending on how youre model is colliding with the other cillinder, it really should jump. if you want a specific behaviour you need to code it down. maybe adding mass to the second cylinder helps, but you should explain better your situation, with screenshots and codes if possible.

avatar image yoyo · Jan 19, 2011 at 05:48 PM 0
Share

What about just letting the physics do its thing, but using a script to force the Y position to 0 each frame?

avatar image user-8010 (google) · Jan 20, 2011 at 08:18 AM 0
Share

yoyo, how shud i do it?

0 Replies

· Add your reply
  • Sort: 

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

Restrict y axis value on random Vector3 1 Answer

Restrict camera rotation in x and y? 1 Answer

Object spawned during collision: Object's Y axis to be colliding object's polygon's direction 1 Answer

Joystick wont'go to it's default position when touch end 0 Answers

Won't Shoot if Y Rotation Value Is Negative 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