# Questions tagged [curves]

The tag has no usage guidance.

67 questions
Filter by
Sorted by
Tagged with
64 views

### How to efficiently path many objects to a moving point?

Working in 3D in the Godot engine, I have an object that moves through space and, like a tornado, is intended to pick up objects in its path. What I have right now is janky, effectively re-baking the ...
1 vote
24 views

### Move a non-convex polygon's outline inwards?

The polygons are small 3D parts of a quasi sphere centered in the origin and a solution that works in the plane can easily be made to work in this world. I tried to move the outline inwards by using ...
1 vote
131 views

### Getting coordinates within a bezier space

I have created an object that is comprised of two bezier curves (constructed of an identical finite segments equal to a variable named resolution). The two curves ...
• 11
50 views

### How do I find the gradient of a noise value which has been re-evaluated on a curve

I have a function Evaluate(), which is used to remap a noise value based on a curve/spline to make the noise more interesting. There are 3 inputs: the noise value ...
139 views

### Increasing Recoil Over Time With 'Diminishing Returns'

I have a recoil system where per shot, the recoil value increases. I want the recoil to increase more quickly for the first 10 or so shots, then settle to a slower increase rate that then remains ...
• 1
299 views

### Why do computer graphics applications use piecewise polynomial curves of degree 3 rather than curves of higher-order, say degree 100?

just wondering why is that? can't get my head around it. wouldn't the use of degree 100 be better? I'm really new to this stuff.
254 views

### Moving object parallel to another on path on 2d space

How to Move object parallel to another on curved path on 2d space
• 1
805 views

### Getting array of points shaping curve from 2 vector3 points

What I want is to get path for DoTween method DoPath(), which as a parameter expects array of vectors shaping the direction of the path. I googled some stuff and found out nothing. Just think bezier ...
• 115
1 vote
3k views

### How to convert Unreal Engine 4 spline to a bezier curve?

I have read the source code of USplineComponent and found that for a curve in Unreal, the result is calculated via ...
• 163
279 views

### curve of animation in C#

I think that the animation curves in Unity lack the fact of being configurable because they are only chosen with a certain type (no sinusoidal function) and adjustable with handles. How in C # create ...
• 111
239 views

### Unity 2D game object moving up in curve?

How can I make a rigidbody2d game object moving up curve like the attached screenshot?
• 103
38 views

### SmothStop Function doesn't work as expected

i'm trying to create a smothstop function i need it to control time variable on my lerp function used to move character and so on...what i have is this ...
• 13
376 views

### help with shooting projectile along a curve path

so i been trying to find a way to shoot projectiles along a curve path . and i found this tutorial on youtube which was really good. i also uploaded the project in case you wanted to check it out. ...
• 69
1 vote
1k views

### Draw trajectory arc predictor in game

I found this tutorial on youtube and it works pretty well, but I want to add more to it. How can I draw a smooth arc path in the game view (right now the path is only visible in the editor)? Here ...
• 69
1 vote
1k views

### Unity Animation Curve to change value over time

I am trying to learn how to use AnimationCurve to change a float value over time. However i am not really sure how to do it Say i have the following class: ...
373 views

### How to move a portion of bezier/spline curve along its complete bezier/spline curve?

Based on the image below, I have a curve (orange) which is a bezier sub-curve of an original curve (longer black curve). The original curve consists of a number of cubic bezier curves joined together. ...
1 vote
126 views

### How to move points of a multi-segmented bezier curve to one side

I am trying to move points from a multi-segmented bezier curve to one end of the curve using the following code which modified for my use from here. Only the last segment seems to give the desired ...
• 109
524 views

### How to move bezier curve points along circle to form a symmetric curve at center

From the image below, A is an open bezier curve with it's points positioned to represent a circle. AP3 and AP1 have the same position. From B, How can I move the points (AP1 and AP3 along the bigger ...
• 109
711 views

### How can I find the distance from bezier curve anchor points to control points for a circle approximation and their positions

From the image below, I have represented a circle by a closed bezier curve made of two cubic bezier segments. I am aware that a bezier curve cannot represent a perfect circle. How can I calculate the ...
• 109
157 views

### How do I determine the slope of a curve?

I am making a 2D game where the character rides on the curve of a graph. I need to find out whether the player is going uphill or downhill and calculate speed accordingly. The problem is that I am ...
450 views

### How to draw 2d road similiar to Outrun, Lotus, Pitstop, Cisco Heat games?

* UPDATED 23/05/2018 * I've managed to implement road generation and curves using the techniques described here I made a short gameplay video. Hope it helps to anybody looking for answers.
• 165
257 views

### Playing Tetris on non-linear surfaces

I am considering designing a Tetris game where instead of a traditional flat game board, the game will transform the board into different kinds of surfaces. I think I lack the appropriate mathematical ...
• 123
11k views

### How can i draw a curve in modern Opengl?

OpenGl is capable of rendering points, lines, triangles and quads; but what if i want to draw a bezier curve? I read online you should use something called GL_STRIP...
976 views

### How to create a boomerang-a-like path?

For the GitHub Game Off Jam, I plan to create a small game with a boomerang. But I don't know how to build the equation that will update the boomerang position. I try to build a direction vector and ...
• 171
339 views

### How to Properly Type My Curve's Formula

I'm creating an RPG game (using C# in Unity API) that uses a leveling system. I went to the Desomos Online Graphing Calculator and created the following curve representing the levels based on ...
499 views

### Third Person Camera Splines

I'm having trouble coming up with a formula/method of creating third person camera with a variable distance from the player given a specific camera pitch. This image shows something close to my ...
• 251
595 views

### Create Bezier curves with random heights that connect

In unity, I am trying to create several curved platforms that connect using bezier curves, however I am having issues. I understand the basics of genertating a bezier curve and I have something ...
2k views

### Z-order curve — how to query all nearest neighbors?

TLDR: How to query all nearest neighbors with the least effort? (Iterating over a bigger neighboring area that's continuous and filtering out elements that are not immediate neighbors?) Suppose the ...
• 121
1k views

### How do you solve where the camera should be on a bezier curve depending on player? (camera on rail)

I am writing a game where I require a camera on rail; That is, the camera's path is fixed and follows a bezier curve. However, I cannot find any resources online for solving the closest point on a ...
• 713
7k views

### How to save and load animation curves recorded at runtime?

Is there any way to save an animation curve, such as using PlayerPrefs? I have this script that records animations at runtime as animation curves, but the curves in the Inspector reset each time the ...
• 8,343
305 views

### Check if a point is touching a user drawn curve in HTML5 canvas

I am having trouble detecting whether a ball is colliding with a red curve. The curve below is an example of what a user may draw on to the canvas. I can't think of any fast ways to detect collision ...
421 views

### Efficiently transforming a series of points into curves to be serialized

I’m working on a video game where I need to display a map (in 2D) of an actual big European city (Paris, London, Madrid… that kind of big) and the player, displayed as a simple dot on the map, can ...
• 2,624
2k views

### How do I quantify the curvature of a touch swipe?

I'm implementing a touch controller for my game. I am attempting to imitate Tiki Taka Soccer's "ball shooting" controls (gameplay video), where the curvature of the player's swipe affects the curve ...
269 views

### Why are my Mecanim animation curves not staying within the entered range?

I have an in-place animation that I added curves to (In the rigged FBX which has the animation). I created 2 float parameters in the relevant controller with the same names as the curves in the ...
• 41
3k views

### How do I make a racing car turn more smoothly when traversing waypoints?

In a racing game, I have set up waypoints for the player to follow. I have added many waypoints to give an illusion of curved movement. However, the player car turns instantaneously when passing ...
• 530
9k views

### Points evenly spaced along a bezier curve

I have looked around for a while and I can't find a solution to this problem. Let's say I have a cubic bezier curve (defined by 4 points) and I want to get a set of points that are spaced evenly along ...
• 241
2k views

### Start iTween MoveTo from a specific node? (Unity)

I just started using iTween as part of my day/night cycle. I'm trying to move the sun and moon along a curve, but I want have the sun/moon start at a specific location depending on the time of day. ...
• 341
334 views

### How to calculate rect-moving-in-a-curved-path collision detection

I'm trying to find the best way to use collision detection for a rect moving in a curved path: here is example of what i have I found few methods and I have hard time to find what is the best way. I ...
• 847
142 views

### How to change animation view in Unity3D?

How can I change the animation view in Unity3D? I have only some "dot", but I want to view some curve! How do I change this? What I have: And what I want: (image from the documentation of Unity3D)
• 77
3k views

### Looking for Bezier curve OpenGL open source implemention [closed]

well in short im looking for something like this as open source. https://www.youtube.com/watch?v=Cut3_A0Xm3Y i need to implement especially the Bezier curve editing in my app in open gl . any ideas ...
• 847
957 views

### Generate race track using freeform curves

I am trying to generate a race track in Vertex Shader(constraint) and only using B-Spline/Bezier/Hermite curves. My problem is that when i try to widen the obtained curve by translating another ...
• 23
240 views

### accelerated curved bounce

I'm trying to make a simple pong clone and want the ball to curve when the racket was moving on hit. To test out curves I removed all the rackets and just have a ball bouncing around in a rectangle, ...
1 vote
2k views

### Move a sphere along the swipe?

I am trying to get a sphere curl based on the swipe. I know this has been asked many times, but still it's yearning to be answered. I have managed to add force on the direction of the swipe and it ...
• 136
4k views

### Infinite 3D Cave in Unity

A friend and I are hoping to make a game in Unity in which you fly through an infinite 3D cave that can twist and wind in any direction (though obviously not to the point that the turns are impossible ...
71 views

### Constantly interpolated splines

Trying to implement a movement through a curve - I'm trying to find a type of curve/spline that interpolates constantly. What I mean: when I interpolate from t=0 to t=0.1, I want it be the same ...
• 316
3k views

### How do I make a curved surface out of rectangular blocks?

For a Peggle-like game, I want to make blocks that follow a curve, like this: The blocks would then disappear as the ball hits them. I managed to draw some horizontally, but I'm having trouble ...
• 171
156 views

### Improving the performance of smooth movement up and down

I would like to achieve a smooth movement of a game object up and down. The way I have always seen this done is via a sine wave, and adding the value of y for a specified X to the game objects value ...
• 183
285 views

### Problem with revolving EP Curve in Maya 2012?

I am trying to create a animated butterfly i made this using the EP curve but when i try to revolve this it turns out to be this can anyone tell me what is the [roblem Thanks Akash
• 111
2k views

### Rotating object along bezier curve: not rotating enough?

I tried to follow the instructions from the threads on the forum (Cocos2d rotating sprite while moving with CCBezierBy) with Unity, in order to rotate my object as it moves along a bezier curve. But ...
• 679