- Home /
[Beginner question] How to grab/attach an object to the player and then throw it
Hello everyone i am new in Unity and right now i want to implement a mechanic in the prototype i am making(it's a top down couch-local-multiplayer game), where the player can pick up certain objects and throw them at other players.From what i've understood so far i should have some empty game objects called grab locations which i place around my player prefab and then whenever the collider i have on my player collides with this objects, with a press of a button i pick up the object to the aforementioned location.Then if it's already grabbed(occupied) with the press of the same button i apply force.Is this the right approach to this mechanic?Also as far as the transform of the object in relation to the parent(player) while it is grabbed, should i do anything specific?Any help/recommendations are welcome!Thanks!
Your answer
Follow this Question
Related Questions
Grab script errors 1 Answer
Sphere with Attach Transform? 3 Answers
How can I attach a gameobject to another without changing its scale. 1 Answer
Pick Up Object using Rigidbody FPS 0 Answers
Grab and throw object immediately 1 Answer