Question by
Privvet · Apr 11, 2021 at 11:39 AM ·
rigidbodyonmousedown
How can you use onmousedown() if there is a rigidbody in the hierarchy?
If a gameobject is in the same hierarchy as a rigidbody, it won't work. How can I make the onmousedown object a child to that rigidbody but still have the onmousedown function work?
Comment
Best Answer
Answer by Privvet · Apr 11, 2021 at 12:30 PM
Just figured out a way you can solve this is by adding a rigidbody component to the object you attached the onmousedown script to.
Your answer

Follow this Question
Related Questions
Figuring out what the acceleration will be before applying force to RigidBody2D 0 Answers
Strange physics on RigidBody when Collider enabled (locked axis) 2 Answers
Is there any reason to have a rigidbody on a gameobject that doesn't have a collider? 1 Answer
Object and first-person controller's collision not being registered 1 Answer
Camera collision with mesh object 0 Answers