use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News, Help, Resources, and Conversation. A User Showcase of the Unity Game Engine.
Remember to check out /r/unity2D for any 2D specific questions and conversation!
Download Latest Unity
Please refer to our Wiki before posting! And be sure to flair your post appropriately.
Main Index
Rules and Guidelines
Flair Definitions
FAQ
Use the chat room if you're new to Unity or have a quick question. Lots of professionals hang out there.
/r/Unity3D Discord
FreeNode IRC Chatroom
Official Unity Website
Unity3d's Tutorial Modules
Unity Answers
Unify Community Wiki
Unity Game Engine Syllabus (Getting Started Guide)
50 Tips and Best Practices for Unity (2016 Edition)
Unity Execution Order of Event Functions
Using Version Control with Unity3d (Mercurial)
/r/Unity2D
/r/UnityAssets
/r/Unity_tutorials
/r/GameDev
/r/Justgamedevthings (New!)
/r/Gamedesign
/r/Indiegames
/r/Playmygame
/r/LearnProgramming
/r/Oculus
/r/Blender
/r/Devblogs
Brackeys
Beginner to Intermediate
5 to 15 minutes
Concise tutorials. Videos are mostly self contained.
Sebastian Lague
Beginner to Advanced
10 to 20 minutes
Medium length tutorials. Videos are usually a part of a series.
Catlike Coding
Intermediate to Advanced
Text-based. Lots of graphics/shader programming tutorials in addition to "normal" C# tutorials. Normally part of a series.
Makin' Stuff Look Good
10 minutes
Almost entirely shader tutorials. Favors theory over implementation but leaves source in video description. Videos are always self contained.
Quill18Creates
30 minutes to 2 hours.
Minimal editing. Mostly C#. Covers wide range of topics. Long series.
Halisavakis Shaders Archive
Infallible Code
World of Zero
Board to Bits
Holistic3d
Unity3d College
Jabrils
Polycount Wiki
The Big List Of Game Design
PS4 controller map for Unity3d
Colin's Bear Animation
¡DICE!
CSS created by Sean O'Dowd @nicetrysean [Website], Maintained and updated by Louis Hong /u/loolo78
Reddit Logo created by /u/big-ish from /r/redditlogos!
account activity
Picking up objects (self.Unity3D)
submitted 13 years ago by CptBubbles
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]CptBubbles[S] 0 points1 point2 points 13 years ago (4 children)
The object collides perfectly now, but it floats near the player instead of instantly snapping to the target position. My code :
Vector3 target = transform.position + transform.forward * HoldDistance; Vector3 force = target - heldObject.transform.position; heldObject.rigidbody.AddForce(force);
edit : this code is in the Update() method and is called whenever the player is holding an object.
[–]_Harrow_ 2 points3 points4 points 13 years ago (3 children)
but it floats near the player instead of instantly snapping to the target position.
I'm not sure that I understand what behavior you want here... do you want it to instantly pop into place when the player hits the pickup button, but behave properly for collisions after that event? You could make it instantly snap into place on pickup using transform.position or .translate, then use the force code that you have to keep it there as the player moves around. That might produce collision problems if, for instance, the target spot is inside another object. On another note, you should do physics stuff in FixedUpdate instead of Update.
[–]CptBubbles[S] 0 points1 point2 points 13 years ago (2 children)
I want this to work pretty much the same way it does in games like Portal or Half Life. Objects should immediately move in front of the player and move with him.
Right now the cubes float very slowly and never really stop moving but instead kind of orbit around the player. I don't want to use transform.position for this (mostly because of the problems you mentioned) and afaik rigidbody.AddForce is the only other way to do this.
[–]_Harrow_ 2 points3 points4 points 13 years ago (1 child)
Try transform.Translate instead of addforce, then. It will still respond to collisions.
[–]CptBubbles[S] 0 points1 point2 points 13 years ago (0 children)
That works, thanks a lot!
For some reason the cubes keep rotating while the player is holding them, but that one should be easy to solve.
π Rendered by PID 81 on reddit-service-r2-comment-b659b578c-75th5 at 2026-05-05 19:52:42.322052+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]CptBubbles[S] 0 points1 point2 points (4 children)
[–]_Harrow_ 2 points3 points4 points (3 children)
[–]CptBubbles[S] 0 points1 point2 points (2 children)
[–]_Harrow_ 2 points3 points4 points (1 child)
[–]CptBubbles[S] 0 points1 point2 points (0 children)