|
| 17 Nov 2013 08:29 PM |
If I were to implement map interaction, what is the best way to approach this?
Detection: 1. Region3 2. Raycast 3. Magnitude 4. ???
Event: 1. RunService.Heartbeat/Stepped 2. Mouse events that check 3. ??? |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2013 08:35 PM |
| It depends on what your trying to do. |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2013 08:39 PM |
CoD-like(yes, I know people here hate it and think it's for scrubs).
You move near an interaction, it pops up a notification that may or may not tell you to do a certain action. |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2013 08:46 PM |
I think magnitude would be best.
I wouldn't do Heartbeat/Stepped because frame rate can slow down. I don't think mouse events would be very smart since if your character falls down or something they may not of used it. I would just use a CFrame changed event. |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2013 08:49 PM |
| Actually, scratch magnitude, because I want the character to be facing what it is interacting with. I think I should go with raycast. |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2013 08:51 PM |
| put a brick clos 2 it an then use a touch an touch ended |
|
|
| Report Abuse |
|
|
| |
|
|
| 17 Nov 2013 08:55 PM |
oh yus
"U BROKE THE TV U IDIOT!" - CeaselessSoul
|
|
|
| Report Abuse |
|
|
|
| 17 Nov 2013 08:56 PM |
| ew no increase in part count |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2013 08:57 PM |
how else r u supos to do it?
"U BROKE THE TV U IDIOT!" - madness725 |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2013 09:00 PM |
| Use lookVector and raycast k? |
|
|
| Report Abuse |
|
|
|
| 17 Nov 2013 09:03 PM |
use my idea first k?
"U BROKE THE TV U IDIOT!" - madness725
|
|
|
| Report Abuse |
|
|
|
| 17 Nov 2013 09:19 PM |
Use mad's idea, then when they touch the brick, use RayCasting to check if they are facing the object.
local Ray = Ray.new(Character.Torso.CFrame,Player.Torso.CFrame.lookVector*20) local Hit,EndPos = Workspace:FindPartsOnRay(Ray,nil)
Then check if hit is the object that makes the popup.
~ Like a Bass ~ |
|
|
| Report Abuse |
|
|