Roblox projectile curve I’m working on a fighting game, and I wanted a feature where you can press a key to throw a projectile, which would be a knife, in my case. new(“RocketPropulsion”) RocketPropulsion. However, something I’m not very familiar with is the math that goes into calculating it’s path on an arc based system. new(0, 0, 0) -- Position reference (The mouse's position or wherever you want the projectile to end) --<< Projecitle creation >>-- For a point to move as a curve in 3D, without any other forces acting on it, a constant acceleration doesn’t work. A Bézier curve is a non-linear curve that you can use to determine the path of an object in 2D or 3D space. Any help would be greatly appreciated! I have a limited knowledge of calculus and Hello, I am trying to understand bezier curves, I have experimented with Bezier Curves for over 10 days now, And I still do not understand it much. Thanks, Hello devs! I made a simple in use bezier curves module without any restrictions in amount of points. For a long time, I wanted a plugin that could curve my road model easily, for me to be able to move the nodes around, make fun curvy forest drives, etc. fromMatrix. I made a module that could calculate it local Bezier = Quick info on bullet/projectile physics: In a world without air resistance, all projectiles (including bullets fired from guns, and arrows from bows) move in a parabolic arc. I have a simple question: Is there an equation for predicting projectile motion towards a moving target? return end if input. I’ve made some code for the projectile and the curve system [They’re not that great] but couldn’t get my hands on the prediction system. Basically, what I wanna do is calculate a perfect zig zag pattern movement for my projectile part from start position to end position. EasingStyle. Parent I’m currently making a bow and it’s really fun to make so far. The top of the curve will be at Y = (Y0 + Y1)/2 + 3/4 * CurveSize. Scripting Support. rbxl (30. I mainly want to know how to do the first part, I probably will be able to make the ink pool. wait delay. Hi, I have problem that I have aiming system using position, and I need to give the projectile some real looking ballistic curve. Untitled 800×600 14. What is this? An actual, I was wondering how games like phantom forces are able to calculate bullet drop. A speed of 1 would have the total path time be the same as pathTime, and a speed of 2 would have the total path time of half of pathTime (totalPathTime = pathTime / speed). I’m making a projectile, and I want to make sure if the player clicks outside of the max distance, the projectile should only go the max distance. Looking to make a client sided project, mainly to prevent latency issues if it was on the server. This are some basic points of what I need. Would I’m aiming to make a soft curved zigzagging projectile, so far it zigzags but its sharp points like this: I’m using a part with a trail effect and lerping it, I saw this article about bezier curves but I’m confused on how to actually lerp it. I’m learning it at school In March. new() -- your bezier curve -- make sure your bezier curve is completely updated and ready to use -- it should not be updated any further after this point, otherwise -- the length of the curve should be updated accordingly -- we are using bezierLength to refer to the length of our curve Introduction Ever since I was introduced to curves (or arcs, rather), like in a well-made bow weapon where you can see the arc and end destination of the projectile, or missiles that came from rockets, I was always interested in hey quick video, all questions in comments So I have this fireball projectile that I’m moving using bezier curves: As you can see in the video, the fireball’s speed changes depending on the distance, which I don’t want, I want it to move at a constant speed. function I am currently just testing bezier curves and shooting arcing projectiles at a target and I have just realised that if the target is moving, or if the distance between the character and target is too long, the projectiles go straight downwards. A good delay is 1/30 which will make the projectile move 30 times per second. The method I know is rather strange?: Change the projectile’s Hello there, im trying to make parts curve with bezier curves and move to destination with random spread. MaxSpeed = 100 About Press Copyright Contact us Creators Advertise Developers Terms Privacy Policy & Safety How YouTube works Test new features NFL Sunday Ticket Press Copyright I cannot seem to figure out the math behind calculating the trajectory of velocity. However, it’s very slow! I need to make it faster but I have no clue how! I figured the only way to make it faster would be replacing my RunService. com Bézier Curves Obviously you repeat this for all points you want so you can create any type of bezier curve from any given points. position ( CFrame. Hello! I am trying to make a teleportation using bezier curve. Hmm I got one last thing, I’m pretty sure it’s the problem now, so, there’s no difference in speed, it’s just because the sizes are constant (X and Y are 3), what I mean is, imagine u have 50 10x10x10 parts, if u move each of them by, say 5 studs, they will look like they travel faster at shorter distances because they are too large and Hello , I am creating a beam that goes directly to where the mouse is pointing. I am attempting to make a flare like projectile that runs on the client. 3 KB) 2nd video test where it bugged out: robloxapp-20240627-2213354. I have tried my best to visualize what I am talking about through videos and images. I have hyperlinked a video on the inaccurate projection when following the tutorial hyperlinked above. cos(math. So in the example with the curve sizes above, where the parts are at Y0 = Y1 = 0, the height of the curve would reach up to Y = (0 + 0)/2 + 3/4 * 10 = 7. rad(45)),math. new('Part', Hello! I’m working on a project and have been trying to use Bezier curves to create curved projectiles, it’s working mostly fine by changing the projectile’s rotation and then adjusting its velocity based on that, however there seems to be a problem somewhere in the formula as my projectiles have been shooting out weirdly when facing a specific direction. If anyone knows any alternative methods to get a smooth curve please reply. How would I make a projectile that shoots smoothly onto the island from where the boss is, he is right next to the island. 2 do local tweenInfo = TweenInfo. sin(math. I’ve heard TweenService isn’t good but I never could grasp why. scripting. local g, v0, x0 -- define these local function x(t) return 0. You can interpolate over a Bezier Curve. 5 to make it less exaggerated. I tried that, but it’s not really working out that well. We know that the derivative of position with respect to time is velocity With that ratio, we can plug it into our Bezier curve calculation and get the position of the projectile. In hopes of making What do you want to achieve? I want to make a soccer ball curve when it is kicked by a player using BodyVelocity or any BodyMover. position) ) If you have any suggestions or ideas, it’ll be greatly appreciated! Hi. Although it encompasses many features, it is very lightweight. I looked at a lot of topic already about projectile motion but i can’t quite found how i could do it since a lot of people use bezier curve which require tweening in a lot of exemple. create. You could achieve this by modeling the curve via a tween first, which is what I did when working on my current football game project. I need to be able to plug in T (time) and get back a Vector3 or CFrame. So I was hoping for a different approach. 5 in its centre. I’ve tried using the Bezier Curve roblox wiki to make my own, but I get lost about halfway through every time. Parent. We know that the derivative of position with We can use a horizontal equation for this. OnServerEvent:Connect(function(player, mousePos, headPos) local function Bezier(t,p0,p1,p2) return (1 - t)^2 * p0 + 2 * (1 - t) * t * p1 + t^2 * p2 end On my golf game I use some physics formulas like projectile motion and friction motion to calculate how much distance the ball will travel, and they all seem to work fine. ZJUZNSW = player. I was able to do this but then they just stop. BasePart. The way I scripted it is that the client fires the server, the server creates a part and moves it along a defined bezier curve using [Bhristt's Bezier Curve Module And I also wanted to know how to calculate the angle at which the projectile would have to be launched to reach a certain position. I have it so when you press R a fireball gets launched to where your mouse is pointing, but where it gets shot is nowhere accurate to where the mouse is! Ill provide the code and a video of what happens. I need to learn Bézier Curves to be able to complete my Roblox game. The issue however, is that I am unable to figure out the formula to get the correct curve for the sphere as I am not tweening the ball, instead I am just updating it in a loop (several reasons) Below is a video of the ball and the curve. speed of projectile between frames is constant. Since I’m using a bezier curve It stops when it reaches the player because I need three fixed points. Parent local Folder = game. Here’s a good video: 1 Like. Since I don’t think you can do this with a AssemblyLinearVelocity, how would you do this? EDIT: while the picture shows a bow being shot at a target, I want to just know how to make the projectile curve like that nvm solved it finally after a long time. Parent = workspace arrow. script. TheESPPlayerSeemoney (let) December 31, 2023, 1:26pm #3. Any help would be greatly appreciated. Here is it: BezierCurve - Roblox So its very eazy to use in 2d and 3d. new(Speed, Enum. Point2. Name char = player. Then I tried to do a curve effect option, and I failed miserably on the calculations, so the ball always fell on the ground too much to the left or to the right. So basically, when the player triggers the proximityprompt, it’ll fire and event. If you don’t want to use this then you can do research on bezier curves. Examples: Ignore the curve path! I am working on a Bow tool and I need it to shoot arrows that don’t just go straight but have gravity actually effect it Right now I have a tween solution that tweens to the end I have no idea how else to do it Ideas?/ Hello. It’ll work like Client presses key → server → all clients → projectile However, I am stuck on figuring out what the projectile hits, and also making it non exploitable. For a physics projectile I like just applying a moment of impulse and letting the physics engine handle a nice gravity curve for me. I’m trying to make curve using P1 and P2 (P = part) I was looking at dev hub and I saw that thing I want is called ’ Quadratic Bézier curves’. I attached screenshots of the “curve” and This magic attack makes use of bezier curves to create dynamic curved paths for the projectiles to follow. By the way when I say perfect I mean I want it to go left and right/right and left everytime without breaking pattern and the left right/right left path lengths to stay the same. Basically partA launches projectile at partB, think like a tower defense game. Scales easily with Roblox's graphic settings. Both velocities used in throwing the ball and projection are the same as I have printed both and they matched up perfectly. Hey everyone, I’m trying to model the trajectory of a ball (sphere) with beams. x is the range of the horizontal component/ I am making a remote event that spawns a spinner the goes towards the mouse. Oh and your only using position if that helps. wmv (1. If that part interacts (or touches) with something, you would make it do what you want. Then it will leave a ink splatter. I created the path of the Bezier but now I’m trying to tween a parts position to follow the path but I have no idea on how to do this. I need to calculate a curved flightpath for a ball as I am making a table tennis game. For that i tried multiple stuffs, one of my idea rn is to use fastcast since the hit detection will be easier and accurate. Any ideas? Do you think it’s best to just run it on the server? I have a public module script, that would perfectly fit what you’re looking for, ZonitoCurves. Bullet local Cooldown = false local DebrisService = game:GetService("Debris") local A few things we should take note of here if we’re trying to find a Bezier curve equivalent to our projectile motion function. If I was to With that ratio, we can plug it into our Bezier curve calculation and get the position of the projectile. We know that P0 = x0 and that P3 = x1, thus we have two unknowns we want to solve for, P1 and P2. However, it does not accurately display the path taken. The server can do a distance check I deleted my recent topic about this, so I made a new one. And I’ve had the question of “What’s the best way to do it?”. As such we’ll need to So I want to create a projectile algorithm for an upcoming project I have planned. GreatFireball. TargetRadius = 5 RocketPropulsion. I recommend reading that Wikipedia Ive had this same problem yesterday which i solved. gg/BDHJnBujnHenjoy Hey, people of the forum! I was wondering how I can make my Projectile actually accurate with the mouse position. From now I have understood that t is the time, I do not understand how to interpolate through a bezier curve to a point, can someone please explain bezier curves without giving a headache. So how should I do this?(Before anyone says Bezier Curves I can’t do that because it’s way to complicated for my skill level). I am unsure of how to determine wether a Bézier curve runs through an object, and if so at what point. I am currently making a projectile system where the user can throw out an object, then if the object collided with anything it bounces and flys back to them. Hit. For instance, what if you want create a smooth curve that goes through the control points rather Hello developers and scripters specifically, I’m looking for: A module which generates a curve using 2 intermediate points as influence between 2 endpoints. With this, you can design any curve you want, with however many parts you want it to be made out of. ReplicatedStorage:WaitForChild("Pistol") local Bullet = Folder. You need the start and end points, and you also need to choose As per request, I'm going to share how to simulate projectile motion and why I choose to simulate instead of relying on the physics engine. 05 should make the projectile move twice as fast for the same task. The neon parts is the path that was created using the Bezier function. Also I am using a tool and server events to pass the necessary information Server Script (tool handler script): tool. Let's start with how: Gravity: For starters, we'll dive In this video I talk about creating a projectile system, the basics of client sided replication, custom physics, and I go over some examples in my own work. 025 to 0. I don’t know how to curve a beam to show the trajectory instead of a straight line from the start to end position. By holding the proper The projectile should have a path that is predictable. So I think the best way to use beams to About The Developer Hey all, I’m Infinite_Visions, an advanced Roblox scripter, owner of Visions Games. Linear) TW:Create(Projectile, tweenInfo, {CFrame = Model is in our discord: https://discord. Target = HitBox RocketPropulsion. I am not sure how to go about scripting it, so I’d appreciate advice. Projectile is affected by gravity, and it fires the projectile towards the mouse. I have the mass, direction, speed and position of my projectile. p it shows the position relative to the world. I have been researching various sources about “curves” and even checked similar scripts with a similar idea, but the beam Hello im trying to make a Bezier curve for an ability for my game, but for some reason it wont work, this is my first time working with Bezier, the output is saying something about Vector3. (it would move up and down randomly and and make a zig zag pattern, it almost seems as it is teleporting) I don’t see anything wrong with my code is there something that I Does anybody know how I could make a projectile go to my mouses position using body velocity? Physics-based projectiles can have anomalies and don’t work well at high velocities. Do UserInputService:GetMouseLocation() and convert it into a Vector3 direction Hello, I have a projectile script that I’m trying to make go to where the player first clicked but I’m not sure how to do that, I tried sending mouse. This guide was originally written for scriptinghelpers. g a fireball or a basketball) and not the result I require. It’s actually 200m/s I’ve got multiple questions about bezier curves and yes i did look at the bezier curve developer article and some other resources but they didn’t answer all my questions about them and then some of them i had a hard time understanding questions that i would like to answer are how would i be able to combine multiple bezier curves and straight lines to create a single INTRODUCTION This module works very simply, but it can be useful in several cases, such as simple projectiles. I read Modeling a projectile’s motion - DevForum | Roblox but, EogMoose’s projectile will always travel and land exactly on your mouse. So instead of going straight with an arc (because the projectile has gravity), doing more advanced such as: formula: So i was wondering if i can make a projectile that follows the above formula like trajectory. I want this project to advanced my scripting skills and learn new techniques throughout my experience. The projectile’s properties must be the same within the server and the client. Thank you – Example below. As already said in other topics of mine, I am working on a shooter right now. The script below works and is bug free currently. I don’t want this because I want the players I am making a boss fight attack with a giant squid that shoots a ink ball onto the island that you are on. Position local Point2 = BezierTest. Heartbeat:Wait() with something faster but there really is nothing faster than it on The projectile would come from a user and should be replicated to all other players. While I have the bouncing working mostly, I see that my Shapecast can sometimes So i was wondering how i can create advanced trajectories for projectiles. If you can leave me to equations, calculations, etc. lua (14. I want the beam to travel in the same direction but with a slight curve. I’m attempting to create an arc-of-travel visual effect for players using the Worker class in my game, which is able to lob bombs a large distance away from itself. Just completely drop or sort of like curve down? If you mean curve then there’s a few ways you can do this, depending on your system it would be different. 1 KB). Activated:Connect(function() local pos Hello developers! My Bezier Curve works but for some reason, the projectile (I am making an artillery that fires exploding projectiles) which is a sphere would move irregularly to the finish point. I have created a rough chart how I wish for it to go. As a somewhat active member of the Scripting Helpers discord one of the most common questions I see is how to have a projectile travel an arc. Point1. X and mouse. And then, theres many stuffs that happens; invisiblity, particles and i want to add a bezier curve when the player gets transported to the position i have set. . I plagiarized all of this from the internet and somehow botched it into a working package so that you don’t have to. OnServerEvent:Connect(function(player,) _G. My idea for the golfing portion is a camera on a golf ball, with an option to direct the ball to where you want it to shoot and a power bar of how quickly I’m trying to fire out a projectile that moves towards my mouse, following a bezier curve. Position local Point3 = BezierTest. wmv (911. The abstract base class for in-world Hello, I’m trying to make a leap ability using bezier curves and I’m trying to figure out how I can have a set speed since the current result is a bit wonky looking. new(0, 0, 0) -- Origin reference local Position = Vector3. Since it’s supposed to be an effect rather than a gameplay mechanic I am not using raycasts but I still want it to move smoothly. MouseButton1 then return end -- ratio effects the bullet curve higher values will make the bullet stay lower and move faster lower values will make the bullet go higher and Add a VectorForce to the ball for the curve, and along with the normal straight shot calculation, you would have to calculate a curve to put into the vectorforce to act on the X axis. This means you actually need another constraint to define the circle, since there’s an infinite number of circles that can be made to go Now; incase that’s impossible, I just wanted to know if there is an effective way to determine where a projectile will hit. function Quadratic(p1,p2,p3,i) p1,p2,p3 = p1,p2,p3 return That’s what I want. Ideally, I would like to include a speed variable to control the speed of the projectile as it follows the trajectory. A modular, open-source, Proof-of-concept roblox projectile system utilizing ParticleEmitters as a graphical visualization. The end result is sometimes off by a few decimals. Basically, i know the problem but not the solution. Do you have to do multiple ray casts forming a parabolic curve with low resolution so to make computation less stressful? Also, if I have a slower moving object like a ball, is it less computationally stressful to do I’ve tried using rocket propulsion so when it hits that hitbox it changes it target but seems unnecessary is there any other way to do this? local RocketPropulsion = Instance. Just put an arbitrary point in the middle of the positions between you and the target and then offset it left or right This guide was originally written for scriptinghelpers. This is likely the “curve” that you’re referring to. Position = proj local newPosition = I’ve seen so many big developers with their games achieved this. However in my use case I am firing at a projectile with a velocity, and then using SUVAT calculations to move it along a path. However, the distance between myself and the end position changes how fast the projectile moves, how would I make it maintain a certain speed? local bodyPos = Instance. I also know you can use body velocity, but it won’t curve. I am trying not to rely on Roblox’s physics, to make the overall performance of the game more reliable. What is the issue? I do not know how to do this with BodyVelocity, I have already tried using Bezier Curves but the goal keeper is unable to save the ball when I use those and the Ball is not affected by physics and walls Video with bezier I am working on an archer tower. I don’t want it to fall by gravity or ricochet off parts, I would just like to know what I could use to make it move straight forward. (PROJECTILE_POSITION, TargetPosition) Wyzloc (Wyzloc) May 27, 2021, 11:21pm #3. This is Use something more deterministic than roblox physics for your projectile. Here is The code: local fb = Based on the video, you’d just need the direction from the projectile to the player. Here is my code: function lerp(a, b, t) return a + (b - Howdy, I am currently working on a Liero type game. I should note that (at least for my case) the velocity- or namely ‘Force’, is perfectly fine and works in every case I’ve tested it in. We can also recognize that the Bezier curve function is normalized such that s = [0, 1]. If anybody would know how please comment! This is my first post, please instruct me if anything is missing. ) Is this also A modular, open-source, Proof-of-concept roblox projectile system utilizing ParticleEmitters as a graphical visualization. MaxForce = Greetings, I am trying to make a leap ability, where a player would leap towards the targeted position in a curve. In this video I talk about creating a projectile system, the basics of client sided replication, custom physics, and I go over some examples in my own work. 3 MB) Code: local Pistol = script. The original can be found here. No homing projectiles! This is because we’ll need the server to be able to predict where the projectile is without being able to see it. I am using a script similar the ones I have used in several other towers: <details><summary>Summary</summary>local arrowClone = arrow:Clone() arrow. Hope this helps I’m trying to model the trajectory of a projectile for X seconds ahead using a beam. I do feel like I have all the puzzle pieces together, but my brain’s feeling a little fried from trying different solutions. 5 * a * t^2 end local function v(v0, a, t) return v0 + a * t end functi So I’m currently trying to make a projectile system with a curve system and It would have a feature where it show a prediction path similar to the game named “BedWars”. local humanoidRootPart = humanoidRootPart local projectile = projectile local projectileSpeed = 50 -- how many studs/second projectile Modeling a projectile's motion. roblox. The problem I am having is detecting collisions. I need to use Bézier Curves for my Roblox Game but I don’t know anything about physics. Most driving games on Roblox have straight roads, or they have I think if you are going for a projectile moving in a curved motion, you should define a path and have a part move in the set path. If the projectile hits someone it should damage them. The projectiles are For example increasing it from 0. The explanations can be a bit confusing I find, but there are a few other devforum posts which explain it better than I would. A lot of people like to define a Bézier curve for this sort of thing and then animate or tween the t value from 0-1 There are tons of forum posts about launching projectiles with Bézier curves, if you’re interested Hello, What do you want to achieve? Keep it simple and clear! I’m trying to make a ball curve (left/right) using only velocity. Everything was going well until I came up with the idea of adding a curve to the beam. How would I go about making the new position of where the projectile would go if the player clicked farther (Assuming you’re currently using bezier curves) How I would do it is you would get the current bezier point, then get the next bezier point and find their distance, then divide that by how fast you want the projectile to go (This will be your speed). wait delays and steps, else the animation might appear choppy. new(Position, mouse. I am trying to recreate the grenades, or, in this video, the “chiquita bombs”, which bounce on the terrain, before exploding. rad(90)} This is my function The math. 8m/s Speed at which the projectile is launched: 200m/s –Ignore the 230m/s. This is a smooth bezier curve: And this is my attempt on it, but its not smooth as I want it to be. Here’s a cool example from Wikipedia of a water fountain doing the same. The only thing I need help with is actually sending the fireball. UserInputType ~= Enum. I couldn’t find any other topics that gave me an answer towards exactly what I am looking for. Its choppy Heres the code I use for the curve: for i = 0, 100, 10 do local pos = Introduction I’ve created a module that allows you to create an nth degree Bezier Curve given Vector3s and BaseParts (to add points that can change as the BaseParts position changes). In this video we're going to manipulate object CFrames to create a projectile system that can be adapted in any way you like. I thank! Some details: Gravity 9. Hello! I made one of my skills use bézier curves to make my projectiles curve more to the right or left when shooting them towards the target. (so it goes up, down, up, down, while still going in the same direction. My base code for the trajectory of the ball was from this post: Here is a video with timestamp of the effect I’m trying to create: Let's Play Aquaria [16] - Mermog Cave - YouTube As you can see the arc of the bullet toward the player. lookAt or CFrame. One of the immediate concerns I may see is that extremely fast bullets have long rays, but the frame-rate Roblox is limited at will make it not perceivable by players, so it works pretty well even with extremely fast bullets. I know CFrames can do this, but you can’t change the speed which is the down side. But the point is this wil go towards B then curve towards C. 2 KB DarkW1tty (Subaru) April 10, 2022, 2:19pm Hello, i’m Rask I’m trying to make a ball physics systems where a ball can curve to the right. This is I am wondering if there is a easy and efficient way to Bezier a projectile (That’s not affected like gravity like this one: Modeling a projectile's motion) the projectile used in this video above is from Elemental Battlegrounds You might not see, but this projectile uses a fast Cubic Bezier, The way I want to achieve this, is to create a Bezier on a projectile that has a constant So i had a issue where my projectile will be a little off where my mouse was but i solved it. You need the start and end points, and you also need to choose two additional control points to define the curve. Edit Added check I’ve used the same method when creating projectile weapons for a while now, it goes something like this:--<< Client has clicked or pressed the keybind >>-- local Origin = CFrame. Let’s say you have a sniper rifle, something with a very high-speed projectile. new("BodyPosition",newBall) bodyPos. Developer Forum | Roblox Projectile movement and hit detection. Well it does the job, however when the part is set free (unanchored) it chooses to move to the left (it also sometimes moves to the right), I assume this is not an issue with the code but with the body velocity. I am using a modified version of the displacement formula to simulate projectile physics. Although these curves are extremely useful, there are some limitations that come along with them. com. UserInputType. A lot of videos and tutorials currently don’t really cover how to do it, commonly making the mistake of creating the projectiles on the server which can cause a delay from the input. This is usually a raycast that inches forwards each frame, taking framerate into account. Where Can I Get RoCurve? I think now my issue is creating that “lightning projectile” and having it lerp along the bezier curve path. Here example of using it in 3d: 3d_2PointsBezier. is there a way I can make it intercept where the Hi DevForum! So basically i have this simple bezier curve system, but how would i make it so the part always faces the same Vector3 value, even tho it’s rotating? local BezierTest = workspace. I want to know how I can calculate a bézier other than a cubic and quad, because my zipline system uses it to calculate curves between points Is there any way to calculate 8 points in a bezier? I looked wikipedia about a bézier, but I only saw quad and cubic. However i’m stuck on the fact that idk how to create a bezier curve to the right using fastcast (or with any cframe stuff ngl) I don’t really know if there could be a that looks like vfx. For this I would use the velocity equation to get the direction you’re object is going to be facing and then from there you can use CFrame. Check out the video on the HowToRoblox YouTube channel to see how this works! The objective Hey there! I’m working on a revamp to brickbattle tools, currently focusing on the Superball. I’ve found these 3 threads, but haven’t had any luck with the information provided Bezier curves to maintain same speed?, Bezier Curve Projectile Travel Speed, and How would I Lerp through a Bezier line Hi, and thanks for reading in advance. Let’s jump into it. CFrame, BodyVelocity, etc. Thanks in advance. My issue arises in the Project function. rad(45)),velo*math. But when i play test, all the scripts works fine but the bezier curve just Bezier An advanced Bézier curves module Repository | Tutorial & Documentation | Roblox model Hey developers, I’m happy to present an advanced Bézier curves module for Luau, which supports Vector3 curves of any degree. 4 КБ) For now it has 2 functions: Calculate(Start position of your curve, End position of your curve, “Step”-it means how much local speed = 10 local position = 0 local bezier = Bezier. I have an idea of using body velocities or positions with tweens but can’t seem to figure it out. however maybe, very unlikely but higherly theoretical it like gets the point on the trajectory with this Graphing Calculator then it gets other points and it uses catmul rom spline matrix transformations to act as a “bezier” curve I am trying to find projectile displacement and then rotate it around a point, My problem is that I can’t find a solution for the z / x-axis These are my angles they are in cosine and sin and multiplied by velocity to simplify my function local v0 = {velo*math. I’ve seen some similar options here on the developer forum, however, they didn’t meet all my needs so I decided to make one myself. In the video posted by @fasmandom, TweenService:GetValue() was used for calculating a time number for calculating the point on the I’m trying to make a part move from pointA to pointB. Introduction We’ve all heard of Bezier Curves — Curves defined by several control points linearly interpolating with one another to create a curve shaped by these points. The module may not give 100% accurate tweening. However, I am having difficulty making the way the arrow curves like a bow. By this I mean it should follow a per-determined path. This module can return the position of a point at any interval t, where 0 ≤ t ≤ 1, and is able to return the derivative of the Bezier Curve at any interval t, where 0 ≤ t ≤ 1. What am I talking about? Games like “Arsenal”, “BIG Paintball”, “Phantom Forces” have guns and weapons that fires immediately without any delay from the click of the mouse to the launch of the projectile (bullets, rockets, you name it). A more sturdy implementation is to use raycasting and run your own loop on heartbeat that CFrames a projectile according to an exact projectile curve equation. Point0. Really, you want to do an arc-length parameterized resampling of the bezier curve if what you really want is constant speed of the projectile. The monkey is basically the part that I am trying to tween. the part can be in any distance (inside gun max distance) It must look really realistic it must look realistic in any distance, so it won’t be just same curve, but scaled it will be really great, to have the curve So I have somewhat of a understanding of Bezier curves. ? What I would like to accomplish is to calculate the velocity a projectile should travel to reach it’s targets predicted future position given the velocity of both the Target and the projectile (and time it takes the projectile to travel to that future position. hit. I can’t explain much right now cause I’m at school, but it has to do something with the camera and UserInputService. Introduction I’ve created a module that allows you to create an nth degree Bezier Curve given Vector3s and BaseParts (to add points that can change as the BaseParts position changes). I know I can’t use tweening for this but that’s as far as i got Thanks for your time Hello So I’m looking to do something like this to help players aim their projectiles I was reading over Egomoose’s tutorial, and realized its contingent on me knowing where the projectile will end up. The whole code: local function Project(Force: Vector3, Origin: Vector3, Goal: Vector3) local Points = {} for Time = 0, 1, . BezierTest local Point1 = BezierTest. Ball. Here’s the code I am using: local fire = nil local flare = Instance. Using basic knowledge of physics and simple calculus we can derive the basic equation of motion that a projectile will take. I need help with making this event spawn the This is a class for simulating projectile motion, designed to be utilized within the Roblox engine. I’m using Editable Mesh to make a road system that I had already designed months ago, but due to the changes in the API it was obsolete for a long time, I already solved it, and I saw that my curves were very bad, until I discovered the stock of the Bezier curves, then, since I don’t know how to calculate them or how to put them into practice, I took But I never do projectile I see a Bullet curve by gravity how to do that Idk what hit box it use someone can tell me and Bullet time speed I think this is not raycast how to do bullet like that. Help and Feedback. I had initially I am trying to make a projectile when you press a button it sends a fireball. The simulator is capable of accurately depicting curves, linear motions, and circular motions. The actual motion of the projectile is simple enough, (I’m using bodyVelocities and bezier curves for now) but actual hit detection for projectiles is something I’m not sure on. Hey, I’m Zander, Chapters: Chapter 1 Chapter 2 coming soon! In this tutorial, I will be covering three major aspects, deltaTime / RunService, lerping, and beziers. This is both a simple and I’ve had a fascination with bezier curves recently, so I decided I would make a module to support 3 types of bezier curves and release it to RbxDev! Get the module here! Also, if anybody wants to help me implement higher order curves, let me know. Hi want to create a smooth arc projectile using bezier curves. Y to a script through a remote, but that didn’t work. Position and it will give whatever velocity it needs to reach Hey there. If anyone has any resources on coding Bézier curves and on So I have been working to create bezier curve projectiles and while I’ve had some luck, I’ve been facing an issue where the projectile will not run a fixed speed along the bezier curve, often slowing down and speeding up at different points across a curve, obviously for a projectile this motion is unrealistic (e. I have split the tutorial into its major parts, and then subsections within those. Position function quadBezier(t, p0, I don’t think anyone here would want to learn how it works, and I don’t blame you. I I’m working on a new project, Blox Golf, which is going to be a golfing range with different games an activities. But not today i tried using linear force my projectile still curves even though the maxforce is set to inf. I have my own clunky script You can’t raycast a curve because a raycast is a like a part beam when something touchs it, its true but when not its false. I’m used to using region3s for my hitboxes, with methods like getpartsinboundbox, and I do know raycasting also works, and I made a projectile, the intention is that it moves straight from the caster’s humanoid root part at the time of casting. Character --[[anim = Hi I’m looking to create a projectile similar to the one shown below however utilising trails as opposed to particles – I’m unsure how I could create the circular motion as it travels; would this use Bezier Curves? I’ve attempted just simply rotating attachments in a 360 motion however had no such luck. 5*g*t*t + v0*t + x0 end local function v(t) return g*t + v0 end Hello good. It provides all functions that you need for game development. Do you want the dodgeball to curve? Since you said so I’m assuming so. I have heard about using raycasting to do this, however I have I have a big problem. But now my projectile curves for some reason? local script code in tool: local Tool = script. maybe for hit detection you can just use touched event if the ball isnt Suppose the first attachment is at height Y0, and the second attachment is at height Y1. The problem is, because i set the random offset on X axis, when i turn 90 degrees right which makes me match up with the X axis, parts does not spread anymore. Tell the server when the client creates a projectile, giving it a projectile ID alongside the position of the player and where they were aiming. When I got to the point of shooting guns, a question came up: How, where to move the projectile? Of course, plenty of other people faced the same problem and looked for help, though I didn’t understand most methods. I want the arrow to travel from the bow to the target. Although you should try to have small task. So projectiles would also be fired rapidly from multiple different parts. I don’t tnik there is a plausible way to make the curve generate like that or I may just be dumb, that’s my give or take. 1 do Baseplate - Roblox Studio (gyazo. This module uses Roblox's ParticleEmitter instance to simulate a projectile moving through the air, while the damage calculations are done with a Ray. In the video, it’s multiple parts, traveling on the same curve. I know that you can get a part on a ray cast but that is a straight line. local function x(x0, v0, a, t) return x0 + v0 * t + 0. -- Timestamps --0:00 Intro0:06 C. I tried replicating the same effect by destroying the parts so i have a projectile script that makes the projectile go to the mouse’s direction, but instead taking a direct route, it chooses to curve?? (amazing drawing i know) the green is where its suppose to go, and the red is Hello, recently I’ve wanted to make a basic projectile, I want the projectile to behave almost exactly like the official ROBLOX rocket launcher. The intended behaviour is that the projectile spreads out from the player before homing in towards the target. You would want a curve for an object moving slowly as gravity acts upon it. One thing I noticed with the usual tools is that since the client firing the Superball is the NetworkOwner of their own projectiles, other clients see the projectile being interpolated, which makes the projectile look further back than it should be. Why use this? This module allows you to make almost completely customizable hitboxes in addition to a different BezierPro EDIT: THIS POST IS OUTDATED READ BELOW That plugin has been implemented with the NEW version of bezier pro which is much better. I’ve heard people Hi. I fully plan on using ray-casting to do so as it’s a weapon based projectile that’ll do damage to the players. sin creates a sine wave with the given hypotenuse, aka t, basically t is the frame of the animation, then multiply it by math. Anyways in the artical there is not written how to make it 3D in roblox. I have seen a couple What do you want to achieve? Parabolic projectile motion with an option to make it more 3D What is the issue? I have no idea how I would go about this What solutions have you tried so far? I couldn’t find anything that could help me What I want is for the projectile to follow a parabolic pattern much like this: The projectile would go towards the direction based on the Sorry I for whatever reason didn’t see this question when you originally posted it. This module uses Using basic knowledge of physics and simple calculus we can derive the basic equation of motion that a projectile will take. pi, which makes it more arched and smooth, and multiply that by the distance between the 2 parts, so the highest point of the sine will be in the middle part of the animation, and multiply all of that by 0. since circles are the only type of curve with constant curvature. My goal is to simulate a “ball effect” where the ball curve to the I want to create a throwing system where the item flys from the players hand to the mousepos with a bezier curve but I dont understand how to make it more smooth. Developer Forum | Roblox How to make A projectile Smooth like this. more. What is RoCurve? RoCurve is a tool for building curves inside Roblox Studio. PrimaryPart. But a cubic Bezier curve requires extra information. Essentially all I want to know is the most performant way of handling a linear projectile. And it happens randomly too 1st video test: robloxapp-20240627-2213083. I just can’t ever figure out what their secret recipe is. Hello people, Just like the title says, how can i get the projectiles to shoot at mouse position because when i use mouse. After, tween the projectile to move to the next bezier point with the fixed speed. I know about the posts that try to explain it, I don’t I want to make it less laggy I spike to around 40-30 fps when it shoots the arrow if H:GetAttribute("SpinSpeed") then --spin speed if when projectile is spinning local SpinSpeed = H:GetAttribute("SpinSpeed") for i=0, 1, . It makes building curves easy. com) I’m just trying to figure out how to make the part I create move in the direction it’s going while it’s travelling through points. Bezier Curve Projectile - Community Resources - Developer Forum | Roblox Loading So i basically am using bezier curves for my projectile, and i want it to travel at the same speed, Currently if i aim it close by it travels slow and if i aim it far it goes fast, how would i make it travel at the same speed no matter what the distance is between StartPosition and EndPosition. So how do we do it? Our first concept is A simple Bézier Curve Projectile100% Client replicatedFollows / Homes in on your mouse----- So I’ve been trying to figure out how to make projectile hitboxes work. They could still calculate a point on a curve every frame and set the CFrame of the ball based on that. x subscript 0 is just the initial velocity of the projectile in its horizontal component. I know how to calculate where it will be after X seconds. CartoonFactor = 1 RocketPropulsion. developer. com I’m trying to make homing projectile, I need to get angle to rotate angle each frame. For example: Known Variables: -- Speed is constant and Gravity Does Not Apply local ProjectileSpeed = 200 local TargetPart The dev probably meant that they don’t use TweenService, not that they don’t use interpolation at all. lrjuhv fpppol xlnuk wqxe hmnwg uljhlpnu kjytq sxqugn osdyn ztldnkx