|
| 12 Jun 2017 02:51 AM |
When the mouse stays still, the object moves closer and closer to the camera. Does anyone know a fix for this?
|
|
|
| Report Abuse |
|
|
|
| 12 Jun 2017 02:56 AM |
| Mouse.TargetFilter = (the object) |
|
|
| Report Abuse |
|
|
|
| 12 Jun 2017 02:58 AM |
| Nevermind, hit ignores targetfilter |
|
|
| Report Abuse |
|
|
|
| 12 Jun 2017 03:00 AM |
No, that works ^. If you want to ignore other instances as well, use the UnitRay of the camera and cast a ray with an ignore list instead.
|
|
|
| Report Abuse |
|
|
|
| 12 Jun 2017 03:03 AM |
Nope, didn't work unfortunately, it is still doing the same thing.
|
|
|
| Report Abuse |
|
|
| |
|
|
| 12 Jun 2017 03:08 AM |
Never used it actually, how does it work?
|
|
|
| Report Abuse |
|
|
|
| 12 Jun 2017 03:15 AM |
wiki.roblox.com/index.php?title=API:Class/Mouse/UnitRay
Make a new ray from the origin going in the ray's direction multiplied by the max distance you want to detect hits from. Then just use workspace:FindPartOnRayWithIgnoreList and put the object(s) you want to ignore in the list
|
|
|
| Report Abuse |
|
|
|
| 12 Jun 2017 03:20 AM |
Thank you! I figured out what was wrong with my code that used TargetFilter, but I will remember UnitRay. Thank you guys for the help!
|
|
|
| Report Abuse |
|
|