You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
8. Insert a part into the workspace and then rename it to "Projectile" and set its size to 1,1,1, and make sure "CanCollide", "CanQuery", "CanTouch" are all unmarked. And drag it into ReplicatedStorage
- Or you can get FastCast2 testing ground from : https://github.com/weenachuangkud/FastCast2/releases
177
-
178
-
# API Usages
179
-
180
-
## Caster Methods
181
-
182
-
```lua
183
-
FastCast.new()
184
-
```
185
-
Construct a new Caster instance
186
-
187
-
<br />
188
-
<br />
189
-
190
-
```lua
191
-
FastCast:Init(
192
-
numWorkers : number,
193
-
newParent : Folder,
194
-
newName : string,
195
-
ContainerParent : Folder,
196
-
VMContainerName : string,
197
-
VMname : string,
198
-
199
-
useBulkMoveTo : boolean,
200
-
201
-
useObjectCache : boolean,
202
-
Template : BasePart | Model,
203
-
CacheSize : number,
204
-
CacheHolder : Instance
205
-
)
206
-
```
207
-
Initialize Caster. Allocate the worker amount of `numWorkers`, rename it to `VMname`, clone `FastCastVMs` to `newParent`, rename it to `newName` , and then create a VMsContainer which is a container of workers, set its parent to `ContainerParent`, and rename it to `VMContainerName`
208
-
- useBulkMoveTo: if true, will enable BulkMoveTo to handle CFrame changes for every `ActiveCast.RayInfo.CosmeticBulletObject`. Can be disabled and enabled by `Caster:BindBulkMoveTo(boolean)`
209
-
- useObjectCache: if true, will permanently use ObjectCache for Caster
210
-
211
-
<br />
212
-
<br />
213
-
214
-
```lua
215
-
FastCast:SafeCall(f : (...any) -> (...any), ...)
216
-
```
217
-
Call the passed-in function if it exists
218
-
219
-
<br />
220
-
<br />
221
-
222
-
```lua
223
-
FastCast:BindBulkMoveTo(bool : boolean)
224
-
```
225
-
Enable or disable `BulkMoveTo` for `Caster`
226
-
227
-
<br />
228
-
<br />
229
-
230
-
```lua
231
-
FastCast:ReturnObject(obj : Instance)
232
-
```
233
-
Return passed-in `obj` to `ObjectCache`
234
-
235
-
<br />
236
-
<br />
237
-
238
-
```lua
239
-
FastCast:Destroy()
240
-
```
241
-
Destroy Caster
242
-
243
-
<br />
244
-
<br />
245
-
246
-
```lua
247
-
FastCast:RaycastFire(
248
-
origin: Vector3,
249
-
direction: Vector3,
250
-
velocity: Vector3 | number,
251
-
BehaviorData: TypeDef.FastCastBehavior?
252
-
)
253
-
```
254
-
Create a new `ActiveCast`; it will not work if the `Caster` has not initialized
255
-
256
-
<br />
257
-
<br />
258
-
259
-
```lua
260
-
FastCast:BlockcastFire(
261
-
origin : Vector3,
262
-
Size : Vector3,
263
-
direction : Vector3,
264
-
velocity : Vector3 | number,
265
-
BehaviorData: TypeDef.FastCastBehavior?
266
-
)
267
-
```
268
-
Create a new `ActiveBlockCast`; it will not work if the `Caster` has not initialized
269
-
270
-
## Caster Signals
271
-
272
-
```lua
273
-
Caster.RayHit(
274
-
ActiveCast,
275
-
RaycastResult,
276
-
segmentVelocity : Vector3,
277
-
cosmeticBulletObject : Instance?
278
-
)
279
-
```
280
-
Fires every RayHit
281
-
282
-
<br />
283
-
<br />
284
-
285
-
<br />
286
-
<br />
287
-
288
-
```lua
289
-
Caster.LengthChanged(
290
-
ActiveCast,
291
-
lastPoint : Vector3,
292
-
rayDir : Vector3,
293
-
rayDisplacement : number,
294
-
segmentVelocity : Vector3,
295
-
cosmeticBulletObject : Instance?
296
-
)
297
-
```
298
-
Fires every LengthChanged
299
-
> [!WARNING]
300
-
> - Very performance-heavy when many projectiles are active
301
-
> - Deprecated api
302
-
303
-
<br />
304
-
<br />
305
-
306
-
```lua
307
-
Caster.CastTerminating(ActiveCast)
308
-
```
309
-
Fires every CastTerminating
310
-
311
-
<br />
312
-
<br />
313
-
314
-
```lua
315
-
Caster.CastFire(
316
-
ActiveCast, Origin : Vector3,
317
-
Direction : Vector3,
318
-
Velocity : Vector3,
319
-
behavior : FastCastBehavior
320
-
)
321
-
```
322
-
Fires if `ActiveCast` is created successfully before the RunService
0 commit comments