|
| 25 Jul 2016 05:12 PM |
so i currently have a bow that shoots based off of the bow's lookvector
which works since my char rotates relative to the mouse
i wanted to use the mouse's position for accuracy reasons
but here's what happened
i used the mouse's x, the char torso's y(to keep it at the same level) and the mouse's z
at super close range, the arrows go all over the place
not sure why
Add 13,000 posts |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2016 05:14 PM |
| mouse.TargetFilter = char + bow? |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2016 05:15 PM |
@Aggressive
stupidly i never tried that
brb
Add 13,000 posts |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2016 05:20 PM |
that failed
Add 13,000 posts |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2016 05:38 PM |
Surely you didn't ACTUALLY do
mouse.TargetFilter = character + bow
? Because that would throw an error.
You'll have to put everything you want the mouse to ignore inside a shared ancestor. Alternatively, manually cast a ray with origin and direction identical to mouse.Ray, and then use game.Workspace:FindPartOnRayWithIgnoreList. |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2016 05:39 PM |
@dire
no, just the character, which has the bow in it(in the humanoid, since i used EquipTool)
Add 13,000 posts |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2016 06:15 PM |
anyone?
seems like it's on roblox's end
unless someone knows why
Add 13,000 posts |
|
|
| Report Abuse |
|
|
| |
|
|
| 25 Jul 2016 06:50 PM |
found the issue
the torso's Y position messes up
Add 13,000 posts |
|
|
| Report Abuse |
|
|
Dominical
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 1303 |
|
|
| 25 Jul 2016 06:53 PM |
Just use the mouse's lookVector property.
local constantSpeed=300 arrow.Velocity = mouse.Hit.lookVector * constantSpeed
|
|
|
| Report Abuse |
|
|
|
| 25 Jul 2016 06:54 PM |
@Dominical
it has to be on a flat plane though
Add 13,000 posts |
|
|
| Report Abuse |
|
|
Dominical
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 1303 |
|
|
| 25 Jul 2016 07:05 PM |
What do you mean? So the arrow goes straight?
|
|
|
| Report Abuse |
|
|
Dominical
|
  |
| Joined: 04 Nov 2011 |
| Total Posts: 1303 |
|
| |
|
|
| 25 Jul 2016 07:13 PM |
| You can cast rays and make the arrow travel in a path by using its direction and speed and detecting if the ray hits something |
|
|
| Report Abuse |
|
|
|
| 25 Jul 2016 07:33 PM |
it works now, i just used a constant instead of torso.Position.Y so it can't glitch out
Add 13,000 posts |
|
|
| Report Abuse |
|
|