Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [curves]

The tag has no usage guidance.

3
votes
0answers
41 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
1answer
70 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 ...
3
votes
1answer
112 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 ...
4
votes
1answer
114 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 ...
-1
votes
0answers
249 views

How to add force on curved swipe??? football

I am a beginner. I've created a soccer game for Android in Unity. I want to shoot the ball and create an after-effect resulting in a curved path with Touch. I could not get to the right direction (...
0
votes
2answers
62 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 ...
4
votes
1answer
172 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.
1
vote
1answer
185 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 ...
1
vote
1answer
2k 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...
5
votes
3answers
245 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 ...
0
votes
1answer
122 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 ...
4
votes
2answers
299 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 ...
0
votes
1answer
267 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 ...
2
votes
0answers
573 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 ...
2
votes
1answer
608 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 ...
0
votes
5answers
3k views

How to saving and loading animation curves

Is there any way to save an animation curve by playerprefs ? The animation curves in the inspector reset each time the script is changed (public variables added) I want record my animation In runtime ...
3
votes
0answers
217 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 ...
4
votes
1answer
191 views

What's the most optimized way to transform series of points into curves in order 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 ...
3
votes
1answer
1k 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 ...
0
votes
1answer
225 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 ...
4
votes
4answers
1k 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 ...
7
votes
4answers
3k 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 ...
4
votes
2answers
1k 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. ...
0
votes
1answer
277 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 ...
0
votes
1answer
127 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)
0
votes
1answer
2k 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 ...
2
votes
2answers
613 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 ...
0
votes
2answers
209 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
1answer
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 ...
8
votes
4answers
3k 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 ...
0
votes
0answers
61 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 ...
12
votes
1answer
2k 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 ...
0
votes
2answers
104 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 ...
0
votes
1answer
266 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
0
votes
1answer
1k 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 ...
3
votes
2answers
7k views

OpenGL GL_LINE_STRIP produces arcs with visible line edges

Another member mentioned an issue while drawing arcs with GL_LINE_STRIP. He has GL_LINE_SMOOTH enabled. The question is, how ...
0
votes
0answers
64 views

Going from point a to b through a curve using “gravity” [duplicate]

I have enemies and when they die they spawn an energy ball with a given velocity. I want to move this ball to the player using "gravity" to create a curved path. I have a version of the function but ...
1
vote
2answers
2k views

How to make a gui button follow a path after a touch?

I would like a button in my gui menu to follow a specific path if we selected it, I am wondering how I could do it: if we touch the button, then it can only move on the specific path, it is an arc ...
12
votes
8answers
8k views

Converting a 2D curve into points for data storage

I’ve created an algorithm which converts any curve i.e. path into minimum number of points so that I can save it into a file or database. The method is simple: it moves three points in equal steps ...
1
vote
1answer
1k views

How do I detect the intersection of a curve with itself?

I'm developing a game in which the player can draw a line. I want to detect if that line intersects with itself. How would I do this?
5
votes
2answers
3k views

Catmull Rom Spline - Constant Speed

Given the equations found in the answer here: Determine arc-length of a Catmull-Rom spline to move at a constant speed How would one A) Apply this to a 3D Catmull-Rom Spline, and B) write A out ...
6
votes
2answers
2k views

How to create a curve from a set of points that passes through said points?

What is the best way to create a smooth curve path from a set of points? For example: I've seen Bezier curves before, but those try to smooth out the path from the set of points, like this:
5
votes
1answer
3k views

How to implement curved movement while tracking the appropriate angle?

I'm currently coding a 2D top-down car game which will be turn-based. And since it's turn-based, the cars won't be controlled directly (i.e. with a simple velocity vector that adjusts its angle when ...
6
votes
3answers
3k views

Best system for creating a 2d racing track

I am working a 2D racing game and I'm trying to figure out what is the best way to define the track. At the very least, I need to be able to create a closed circuit with any amount of turns at any ...
5
votes
1answer
3k views

making a box2d body move along a Bezier curve/ arc path

I have been trying to make a box2d body move along a Bezier curve/ arc path. Most of the posts I've seen recommend an approach of manipulating SetLinearVelocity and SetTransform to arrive at an arc-...
2
votes
3answers
1k views

Tessellating to a curve?

I'm creating a game engine, and I'm trying to define a 3D model format I want to use. I haven't come across a format that quite does what I want. My game engine assumes a shader model 5+ environment. ...
2
votes
2answers
2k views

Implementing a sine using a bezier curve

I'm developing a 2D game using Cocos2d-x. Is possible to use CCBezierTo to parameterize a sine function?
1
vote
2answers
660 views

How would I move an object using its velocity on a closed curve?

I want that an object follows a path, in Peggle game there are some pegs that have movement in a closed path. How can i get the same result? I guess that I can use parametric curve but I need use the ...
4
votes
1answer
1k views

How to compute the 2D equations of 3D circular arcs?

I'd like to obtain these equations for the ellipses produced by the perspective projections of (3-dimensionally transformed) circles. This is useful for rendering in 2D contexts which provide curve ...
1
vote
1answer
1k views

How to generate closed curve?

How can I do that? I can generate simple beziers, but how can I generate a closed curve like this: http://www.youtube.com/watch?feature=endscreen&NR=1&v=hlDYJNEiYvU