ActionScript 3.0 :: The Right Physics Engine / Collission Detection?
Apr 15, 2010
Some time ago i played this great flash game I want to create a simple level where you can walk around, just like in that game. But i was wondering what kindof physics engine or collission detection i would need if you want to walk over hills or objects where the persons reacts to
View 2 Replies
Similar Posts:
Feb 3, 2010
I wanted to study some physics code lines related to flash actionscript 2.0.Is there anyway to build a model with physics incorporated without a physics engine? By bare actionscript?If yes, can anyone show me a tutorial or an explanation to learn somehting about it, please?
View 0 Replies
Aug 29, 2011
I know you can add a var to add grvity and velocity ect. But what are the limits of this?Can i have a ball roll downhill using physics from within flash, without a external physics engine like box 2D.Can i have impulses? Well thats not important just wondering really.What can you do with physics in flash?
View 5 Replies
Mar 9, 2011
I am in need for some 2D physics seen from "above and straight down". Basicly I can sum it up with a "throwing balls into walls" kinda physics.
There seem to be quite a few physic engines for as3 out there, but I wonder if anyone have anyone special to recommend regarding my particular need as well as performance of the engines.
View 9 Replies
Jan 9, 2011
Introduction: I think Nape is a relatively new engine so some of you may not know it. It's supposedly faster than box2d and I like that there is decent documentation. Here's the site: [URL] I'm relatively new to programming. I am decent at AS3's basic functionality, but every time I try to implement some kind of engine or framework I can't even seem to get it to work. With Nape I feel I got a little further than before but I still got stuck.
My problem: I'm using Adobe CS5, I managed to import the SWC file like described here. Next I tried to copy the source of one of the demo's like this one and get it to work but I keep getting errors. I made a new class file, copied the demo source to it, and tried to add it to the stage. My stage code basically looks like this:
[Code]...
View 1 Replies
Jun 3, 2009
where i can find a water physics particle engine.
View 2 Replies
Apr 8, 2011
Is there anyone that can write a really basic physics engine including 1 ball and 1 solid object?
So it should be 1 ball and then 1 solid object like a box. The box should be completely solid, the ball shouldn't be able to go through the box, it should just stop when hitting it at any angle.
View 13 Replies
Jun 15, 2011
I need help with one of my Flash projects,I'm trying to use gskinners shape based collision detection, but for some reason I cant get it to work, but im pretty new to using classes, so I dont understand the structure too much. Can i get a tutorial on how to use the gskinner class? im using the as2 version.heres the code, bare with me, there's a lot here. in all codes, mc1 is the track outline MC, and mc2 is the car
basicly im making a 2D top down version of WipEout HD Fury, so file structure is something like this (the .fla is called wipeout as3 because i was initialy coding in as3 and never changed the filename).wipeout as3.fla (the flash file containing all the MCs and animations, but only enough coding to import all of the external code files, as well as the VCam and its script)
the code is;
Code: Select all #include RaceControl.as"
the RaceControl.as is used to determine the Car's control scheme, and refers to a physics code called RaceCar.as. i found it on the interwebs, all credit to matt carpenter;
Code: Select all// Race control
// Create key listener[code]........
the Bounce Function is my own work, and is what i want to happen when a collision is detected.now, the movieclip used for the car is my own drawn design, as is the track, and i want to use GSkinner's shape based collision to detect the collisions properly. so far i have the car driving around quite happily but i need it to collide with the walls of the track, rather than drive right through them.
View 1 Replies
May 16, 2011
I'm trying to create a simple disappearing action when a WheelParticle hits a special disappearing CircleParticle. Normally the WheelPartical bounces off of a bunch of other CircleParticles, but when the WheelParitcal collides with this CircleParticle, the action Pauses, an animation plays, and when the action resumes, many surrounding circle particles have dissappeared.
The problem is that the WheelParticle needs to just drop from a complete stop, but it continues as if having just bounced off of the, now non-existant CircleParticle.
I'm having trouble clearing out the forces. I've tried init(), addForce() and changing .velocity amoung other things, but it keeps wanting to continue the lateral bouncing movement. I'm using the latest trunk version of APE in order to capture Collision events for sound.
[Code]...
View 1 Replies
Jul 19, 2010
I have APE, but I'm not sure I can effectively utilize it for this project. Box2D seems popular, as do WOW and some others but I'm not sure which would be best for simulating celestial mechanics. The physics I need are essentially those used in the classic two-body problem.
View 1 Replies
Mar 30, 2011
am working on a car game,can any one help me to find car side collission, actually the method I used is hittestpoint.
View 3 Replies
Apr 23, 2011
how to work out the direction of the mouse on stage and say from this:
"if the mouse goes from the left to right (visa-versa) once, add score +1" and "if the mouse speed which is player controlled - slows down - to then display an error graphic"
View 21 Replies
Jul 29, 2010
Is there any as3 based source code that accomplishes pitch detection or beat detection accurately? Doesn't have to be both, if you know of at least one of those,
View 4 Replies
May 7, 2004
I'm trying to create a simple top game. Except, the movement of toy tops isn't so simple.I've been able to get the top to trace out squashed loocking spirals. However, the motion isn't random and there's no object detection. I was thinking that some variation of a bouncing ball script might work. However, the movement would have to be confined to the appearance of a perspective plane (so that it looks like it is spinning on something flat)
View 11 Replies
Mar 16, 2011
I want to make a game using physics in Flash, so I stumbled upon Box2D, but i find that hard to use [the basics are simple, but when i see the scripts,so i was wondering if there are easy to use flash physics engines?
View 6 Replies
Feb 1, 2010
There are some open SDK for Flash, that could be done. Rotating photos with physics? Examples of such programs BumTop, ePic, Coloris (no physics). The photo on the plane, it can be moved to the real physics?
View 1 Replies
May 23, 2005
i was just wondering, how could you make realistic car driving, with regard to turning, braking, backing up etc.....
View 4 Replies
Apr 2, 2005
I need to animate little blocks to fall down when rollovered... but i want them to start falling and keep falling once mouse hittests with it... so when the mouse isn't over the clip... it keeps falling... does anyone know how i can do this? and if anyone knows some good actionscript for elastic falling with slight rotation that would be sweet....
View 5 Replies
Dec 27, 2010
You know how adobe promised us physics in flash?URL...If you've been wondering why they left it out, turns out they didn't.URL...
View 4 Replies
Jul 28, 2010
I am trying to figure out the collision physics for a top-down racing game in Flash / AS3. I am currently using the hitTestPoint method for detecting collisions, but I don't know how to apply a decent physics method to bounce a vehicle off of a wall that it hits.
View 2 Replies
Oct 8, 2011
I've made a character, and used the bone tool to make it move in runtime.This works fine, but now I want to add gravity/physics, so I can throw my character and it lands on the ground like a real ragdoll. How do I do this in actionscript 3 ? And is it possible to do this within the fla (no class file).
View 1 Replies
Aug 28, 2011
I have been trying to see how this splat effect animation from some sort of "paintball game" works. I think this is using an open-source APE(Actionscript Physics Engine).Actually, I guess it's the one from cove.orgAs I cannot post links yet I'll tell you where it is.If you don't feel like wanting to look for it,I can PM you with the link to it.Write this in the google bar : "Minijuegos"+"Battle Paint" // that is the name of the game.There is a class named "Floor" which is used in the menu of the game, where random splat shots start appearing in the background. I am trying to figure out how it works.This is the class code: I think everythig related to the splats is in there, but still don't see which functions make the whole animation.
The key must be in functions: generateSplatter","createSplotch","generateSplotch","generateSplatterHd","addSplatterHd","addColor"(I think this function adds color to the splatters, which is not so important right now) and that's all with the functions.There is an array, ThePaintSplatArray( must be an array containing a lot of particles, which are bitmaps of small circles i guess)I'm not used to working with AS.That's why I'm doing a deep analysis of the code to understand the way it works.he code was way too long to put it here. SO I zipped it up. YOu will found the floor and particle(what makes the physics stuff work) .as files.
View 0 Replies
Jul 29, 2010
I have the values (x, y, xSpeed, ySpeed) of the movieclips (Hero and Badguy)Now, when they collide, how will i calculate how hard the collision is?Obviously weight, acceleration, etc. are out of the question, as it just needs to be based on their speeds.
View 4 Replies
Dec 12, 2004
Im trying to find some examples of graphical representations of physics/mathematicsformulas. You know, where a pattern is drawn based on that formula.
View 3 Replies
Jun 14, 2009
As the title suggests i want to apply physics (gravity mainly) to a line drawn with the curser using the createEmptyMovieClip method.Below is the code in the main frame (sorry its a bit long), what I'm trying to do is make something like crayon physics (i know it will be difficult).So far i can draw lines and make certain objects ( a ball for example) be affected by gravity, but when I try to make the drawn lines be affected by gravity it stuffs up.he first line drawn is produced in the wrong position, (it should be at mouse point but isn't) and you can't draw any subsequent lines. This problem doesnt exist when i remove the gravityBasically what i want is that each line that is drawn can have actions assigned to it... (so i can add gravity and unique properties for different line types)
//force settings
//Drawing tools
_global.general = 0x0000FF;
[code]....
View 3 Replies
Nov 4, 2009
I need to add a small amount of physics to some moving elements.I found flade, but it looks like overkill for what I'm looking for. Also, all the examples are side-views with gravity.
Basicaly, I have a top-down view, and have square shapes that I want to be able to slide along a wall when they hit it at an angle. They don't even need to rotate when they make impact. I tried comming up with my own solution, based on the relative rotations and quarants they collide on, but it is very clunky. I can't help but feel there is a better way to do this. Heck, there might even be some usefull ActionScript function that I don't know about.
View 14 Replies
Aug 14, 2011
I admit it. I'm a mathematical imbecile. should I be attempting this at home? Probably not without serious injury. Anyway. Anyone that has a bit of experience in games and physics who can review this code and provide insight into why there is a built in "loss" in velocity in prototype would be hugely admired.
the concept: the actor falls from the sky, at some point intersects a boundary (trampoline.y) after which gravity (in this example a value of 1.6) stops operating and a restitution factor (in this case a value of -6) takes over.
right now I'm trying to create a zero-sum situation where you have the same velocity coming out of the trampoline "bounce" (hero.y >= trampoline.y) as you did going in. That's just not the case as the traces reveal.
[Code]...
For now I'm hoping to have a solution where the velocity on the tic after the character leaves contact with the trampoline is the same (but negative) of the velocity just prior to going in. Heck I've even tried storing and retrieving the entry position and velocity, but that just looks like a hiccup.
View 1 Replies
Nov 11, 2009
I'm creating a ball bouncing in 3d. My problem is that I have a square boundaries. top,bottom, front, back. I tried get the the distance ( of the sphere/radius) but went I * vx , vy , vz by 1 or -1. One of the position is - while the other two might by positive. I need pool ball physics with the boundary be a 3d sphere.
View 9 Replies
Apr 12, 2011
I have this button (letter X on keyboard) where if you press it, the character jumps, and the LONGER you press it down, the higher he jumps. So that works fine. Actually it works perfect since it's suitable that KeyboardEvent.KEY_DOWN fires constantly as you hold it down. And the longer you hold it down, the higher a variable (jumpSpeed) gets, thus the jump gains altitude.
NOW, if the character LANDS, and you're still HOLDING X, he instantly jumps, like a bunny. Which is what i DONT want. This is where the problem lies, I want the KEY_DOWN to keep firing for escalating the height of the jump, but once he hits the ground, I want the Player to RE-PRESS the X key to jump.
Heres follows the KeyboardEvent Code:
Code:
public function jump2():void
{
addEventListener(Event.ENTER_FRAME, onENTERFRAME);
[code]....
View 4 Replies
Mar 24, 2010
I'm working on a 2D game that has an uneven terrain similar to sonic the hedgehog or fancy pants. I've been looking at different ways to implement the collision detection and collision reaction of the character on these uneven terrains. Basically, these terrains use curves, which makes collision reaction much more difficult to work with. My first thought was to make a grid around the terrain and then use the slope of that grid to rotate my character and give the illusion that the character is moving along with the curve. However, this isn't giving me the results that I'm looking for.
If you look at sonic the hedgehog, they were able to make sonic run on curved terrain without any issues. My question is, how can I mimic the physics in a game such as sonic the hedgehog or fancy pants.
View 2 Replies