Dear experts,
I wanted to implement ball physics and as i m newbie, i adapt the code in tutorial
http://adam21.web.officelive.com/Documents/JavaPhysicsTutorial.pdf .
i try to follow that as i much as i can,
but i m not able to apply all physical phenomenon in code, can somebody please tell me, where i m mistaken or i m still doing some...
Hi!
What is the best 2d physics engine for xna 4.0 in your opinion ? Farseer don't work at all on my vs2010 :/
...
Im trying to understanding collision detection in 2d world. I recently got this tutorials http://www.gotoandplay.it/_articles/2003/12/bezierCollision.php. I have question which puzzled me a lot - on the flash demo ball is dropping without responding if i try to swap the starting and end point.
Can someone explain me , how the simulation...
I have a rotating sphere that the user rotates by applying a virtual force, like a virtual accelerator. I want to be able to simulate a nice momentum effect so that when they lift off the accelerator the ball winds down in speed in a natural and realistic way, as if due to friction and/or gravity. I don't want to get into any deep phys...
I have a question regarding using primitive shapes and simulating a circle to be free falling. How would I go about this? Do I use the formula for gravity?
...
In Box2D, when a body that is connected to a joint is removed from the space, the joint is automatically deleted and you can do stuff in callbacks and so on.
Does Chipmunk do this? If so, how can I detect when a joint connection is 'broken'? Do I have to keep track of this stuff manually?
...
So I've got:
class bc_Game
{
public:
//blah
private:
b2World world;
};
bc_Game::bc_Game()
{
//blah, defining variables used
world = b2World(gravity, sleep);
}
Now, I just get
error: no matching function for call to 'b2World::b2World()'
note: candidates are: b2World::b2World(const b2Vec2&, bool)
note: b2World::b2Worl...
I'm writing a side scrolling game with physics. Before get my hands dirty i started concentrating on physics and rendering graphics. Initially i thought of keeping every thing static (non scrolling).
For physics after referring to many tutorial finally i ended up here http://www.tonypa.pri.ee/vectors/tut08.html. This set of tutorial cove...
I am trying to write a class that handles swiping (touch down, move, touch up) actions.
This is the code I am using to get the time and distance for the object to travel after a swipe. The results are very inconsistent- sometimes too slow or too fast, sometimes the obejcts move too far or not far enough.
Can anyone give me some directi...
I'm working on a 2D physics engine for a game. I have gravity and masses working, using a simple iterative approach (that I know I'll have to upgrade eventually); I can push the masses around manually and watch them move and it all works as I'd expect.
Right now I'm trying to set up the game world in advance with a satellite in a simple...
Hi Guys,
In my Flash File I have a wheel. The user is able to rotate the wheel by using arrows to jump to the next "segment" (think 20 images attached to each other forming the circumference of the wheel).
Clicking the arrows initiates this code:
protected function rotate():void
{
var rotateTo:Number = (-360 / num...
I'm trying to simulate a rollercoaster game with ActionScript 3, but i don't know exactly if I should use a 2d engine (like Box2d) or do it from scratch.
For any of those I would like to see some code example.
Any ideas, pointers, suggestions... Thanks in advance!
...
Hi, this is a Math problem for a 2d game.
Given 2 object ( 2 car, 2 tank, 2...), for each object i know:
1. X, Y
2. Actual Speed
3. Degree of movement (or radiant)
How to calculate the "effect" of a collision for the 2 object
Ps:
I "move" the object with this simple formula each tick of my "game loop":
ychange = Math.Sin(radiant...
I am trying to learn Verlet integration, mainly because I'm bored, and want to spice up my normal "bouncing ball" learning exercise.
I have a simple bouncing ball Canvas/HTML5 page at http://sandbox.electricgrey.com:8080/physics/. If you click on it you'll notice that the ball doesn't always bounce back to the same height. Sometimes it ...
I wrote this repel function (below) for 2 movieclips and I call it from a timer instead of an enter_frame listener (speed), but it has the tendency to jerk and not be very smooth. How can I smooth the movements? I was thinking maybe adding some sort of padding or something, but idk...Any help would be greatly appreciated.
Thanx :)
func...