- Home /
Question by
atifraheem48 · Aug 23, 2019 at 06:46 PM ·
scripting problemphysicsraycastspriterendering
How to get pixel coordinates when mouse click on Sprite Renderer
Hi, I have a SpriteRenderer , and Collider2d on that game object. I want to get exact pixel of sprite where mouse click. I tried var pos = Camera.main.ScreenToWorldPoint(Input.mousePosition); then Raycast and textureCoordinate2 to get pixel but not succeeded.
Comment
Your answer
Follow this Question
Related Questions
My raycast wont function properly 0 Answers
Kinematic rigidbody shakes 1 Answer