Questions tagged [curves]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
28 views

Unity 2D game object moving up in curve?

How can I make a rigidbody2d game object moving up curve like the attached screenshot?
0
votes
1answer
22 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 ...
0
votes
1answer
91 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. ...
1
vote
1answer
195 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 ...
1
vote
1answer
59 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: ...
7
votes
0answers
139 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
91 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
147 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
200 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 ...
0
votes
2answers
65 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
232 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.
2
votes
1answer
200 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 ...
2
votes
1answer
3k 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
331 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
153 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
339 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
340 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
737 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
660 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
6answers
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
231 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
212 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 ...
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
230 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
2k 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 ...
9
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
296 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
129 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
694 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
211 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
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 ...
0
votes
2answers
105 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
276 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
8k 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
2k 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
4k 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. ...