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 Saowi · Aug 18, 2013 at 05:42 PM · positionnoob

Trade positions of 3 objects/cards

hmm sorry for the unclear question. the one im trying to do here is that i have 3 cards which is horizontally arrange

so my 1st card is in 1st spot, 2nd card in 2nd spot, 3rd card in 3rd spot..

so when i drag my 1st card to the 2nd spot the card in the 2nd spot will move to the 1st spot..

Im done with the drag and drop script so what im trying to do is the changing position of the cards..

Thanks for the replies appreciate it.

I'll post it in forum, but if yoiu guys has a solution or can help me.. pls just answer here or reply..thanks

Comment
Add comment · Show 8
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 aldonaletto · Aug 18, 2013 at 05:51 PM 0
Share

This question is too unclear! It could refer to waypoints: the object moves continuously from one spot to the next one, and when the last one is reached it goes back to the previous one, and so on. Please explain in more detail what you wanna do.

avatar image cdrandin · Aug 18, 2013 at 05:52 PM 0
Share

Don't understand what you really want to do with that.

avatar image Saowi · Aug 18, 2013 at 07:27 PM 0
Share

hmm sorry for the unclear question. the one im trying to do here is that i have 3 cards which is horizontally arrange

so my 1st card is in 1st spot, 2nd card in 2nd spot, 3rd card in 3rd spot..

so when i drag my 1st card to the 2nd spot the card in the 2nd spot will move to the 1st spot..

avatar image Sajidfarooq · Aug 18, 2013 at 07:41 PM 0
Share

So which part do you need help with? How to drag an object? Or choosing which spot to move it to?

avatar image robertbu · Aug 18, 2013 at 07:43 PM 1
Share

This is essentially the same question I closed yesterday. And it has the same problems. If it is a high-level design question, then it is best asked on the Unity Forums. If you are looking for specific help, you need to break it down into specific technical questions and take it one step at a time. In addition to the multiple different questions there are multiple different ways to implement this functionality, and they depend on the nature of your game...2D or 3D? Rigidbody or direct manipulation of the Transform? $$anonymous$$ove the cards over time, or instant transport? ...

$$anonymous$$aybe you should start with drag and drop. There are a number of UA posts on the issue. Search out some scripts and try them. If you have a problem with a specific script, post the question and script back to the list.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by WizzDE · Aug 19, 2013 at 04:22 AM

Todo:

  • Check somhow if your 1st card is touching the 2nd card (you could do this with raycasts, coliders, position checking...find a way that matches for you)

  • As soon as the 1st card is touching the 2nd one move the second one to the position of the first one (you need an vector3 arrayor something like this. The cards could also have a script atached which stores the current possition)

  • You could move the cards using an animation or vector3.lerp (for every question you have: try to break it down in some smaller questions and then look them up in the docs or here.)

  • Check out the unity docs!

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

19 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

Related Questions

Setting a starting position for bullet. 1 Answer

Camera rotation around player while following. 6 Answers

Game object position. 1 Answer

Camera movement 1 Answer

Trouble using [Command] in a login script for a server. 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