• 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 effix · Apr 01, 2012 at 04:48 PM · griddragdraganddropgrids

dragging objects horizontally in a grid or in increments

Hi Just to clarify.. I am a complete rookie at programming. I want to make a simple puzzle. For this I need the player to be able to click and drag a gameobject horizontally. It is important that the gameobject (which is a cube in this case) moves in a grid.. or in increments so it seems like a grid. I found the script below... however I cant seem to get it to move in increments. How should I go about doing this? Pseudo-code or actual code will be greatly appreciated!

http://www.unifycommunity.com/wiki/index.php?title=DragObject

Really no one? Hmm

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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Meltdown · Apr 04, 2012 at 09:00 PM

Use the search feature.. This has been asked many times...

http://answers.unity3d.com/search.html?redirect=search%2Fsearch&q=cube+snap

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 effix · Apr 04, 2012 at 10:17 PM

I have used it. And i havnt a answer that i could use...so therefor i post this question.

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 HolBol · Apr 04, 2012 at 10:17 PM 0
Share

This isn't an answer to the question. Use the Comments section, it's not as if it isn't there.

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

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Drag to grid script help? 1 Answer

Snapping object to .25 grid 0 Answers

Snap to grid after click and drag? 2 Answers

Grid snapping 0 Answers

I need to Snap a 3d object to a grid when it is placed in game. 1 Answer

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges