Hello, I want to recreate Sacred Fortunes from Alice in Borderland. In this game, arrows are shot from a direction and you have to avoid them.
I can’t wrap my ehad around raycasting at a crtain angle, and I’ve tried but it had a LOT of bugs.
Hello, I want to recreate Sacred Fortunes from Alice in Borderland. In this game, arrows are shot from a direction and you have to avoid them.
I can’t wrap my ehad around raycasting at a crtain angle, and I’ve tried but it had a LOT of bugs.
im too lazy to watch the video but you might be able to use body movers making it move in a specific direction until it hits something
edit: i thought the new things were called body movers too my bad i meant MOVER RESTRAINTS
VectorForce/AllignPosition instead.
Do not use depracated instances.
I’d agree with @Yarik_superpro in that you should use VectorForces. For implementation at its most basic level you could have a arrow on fire mesh that you then clone, place at a predetermined position and then move with a VectorForce. So, as an example:
--- pseudocode
local arrow_firing_module = {}
local arrow= server_storage:FindFirstChild("arrow")
local arrow_starting_locations = {} -- populate with locations
local arrow_firing_direction = Vector3.new(0, 0, -1) -- Could also calculate direction with (destionation_part.Position - start_location.Position).Unit
local arrow_speed = 5000
function arrow_firing_module.fire_arrows()
for _, start_location :: CFrame in pairs(arrow_starting_locations) do
local arrow_clone = arrow:Clone()
arrow_clone.Parent = workspace
arrow_clone.CFrame = start_location
-- HOW YOU'D IMPLEMENT VECTORFORCE
local force_vector = arrow_firing_direction * arrow_speed
local vector_force = Instance.new("VectorForce", arrow_clone)
vector_force.Attachment0 = Instance.new("Attachment", arrow_clone)
vector_force.Force = force_vector
vector_force.RelativeTo = Enum.ActuatorRelativeTo.World
end
end)
Well, you can say that was a GAME CLEAR. I had to fix some things up, but it worked! Thanks!