ActionScript 3.0 :: Pool Ball Physics With The Boundary Be A 3d Sphere

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


Similar Posts:


ActionScript 3 :: Ball Physics (Fast Move And Small Objects On Path)

Mar 31, 2012

After read a lot about ball physics, watch some examples and few days of trying making pinball with bitmaps, I use simple (easy to work with) and fast performance Physics AS3 engine for bitmaps [URL] but still cant fix problem: if ball is moving too fast and object on path is too small, there will be no collision detection (code works perfect only with bigger objects or if ball is moving slower). I am not good at physics and maths. Here is function code which make physics for ball on every frame rate (but maybe its better to change it to setTimeout):

function showFrame(e:Event) // onEnterFrame{
var collisions:Array = collisionlist.checkCollisions();
if(collisions.length) // if collision{
var collision:Object = collisions[0]; // get collision information
var angle:Number = collision.angle; // get collision angle
[Code] .....

View 2 Replies

ActionScript 3.0 :: Basic Physics Engine Including 1 Ball And One Solid Object?

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

ActionScript 3.0 :: Vector Addition (Physics) - Move Ball Towards A Specific Angle And Magnitude?

Jun 28, 2010

Say for example I have a ball and I would like to move it towards a specific angle and a specific magnitude I would use something like:

[Code]...

Now if I wanted to change this force, for example, add a force to it, say, with magnitude 0.5 and angle 20, how would I do that?

View 2 Replies

Actionscript 3 :: Object Pool - Create Ball Objects When The User Holds Down The Mouse Stops When User Lifts Up Mouse?

Dec 24, 2011

I've been reading a lot about the benefits of Object Pooling. Found some "tutorials" online, all above my skill level. Can anyone please show me an extremely simple example of an Object Pool. What my game does is creates Ball objects when the user holds down the mouse, stops when user lifts up mouse. I need to store these Ball objects in an array(or Vector), and hit test them with other objects, removing them from the stage when the hit another object. I'd like to create a pool of say 20 of so, created once, and recycle them.

[Code]...

View 1 Replies

ActionScript 2.0 :: Build A Model With Physics Incorporated Without Physics Engine?

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

ActionScript 3.0 :: Is Basic Physics Possible Without Physics Engine

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

ActionScript 2.0 :: Make A Ball Bounce Off Something Like A Ball Bouncing Off A Bumper In A Pinball Game?

Jun 20, 2006

i wanna ask how do i make a ball bounce off something like a ball bouncing off a bumper in a pinball game? i've tried a lot of times but everytime the ball get stucked to the box and it doesn't move anymore...will be grateful if anyone noes the actionscript of it..

View 3 Replies

ActionScript 3.0 :: Ball Collision Inside Another Ball Using Gravity?

Jun 5, 2009

ball collision inside another ball using gravity.I have one large circle in the middle of the stage (its radius is 150 pixels). I have another circle inside of that one (20 pixels radius), this is the smaller ball that I would like to have bounce around inside of the larger one with gravity. When the small ball hits the edge of the larger circle, I would like it bounce inwards to the center of the larger circle. It keeps doing this until it eventually stops in the center of the larger circle at the bottom.

View 1 Replies

ActionScript 3.0 :: Getting Objects From An Object Pool

Jul 31, 2011

I'm learning to use Object-pooling. I'm trying to see how to get objects from the start of the pool and shift all the objects at position i to i-1. I've had a look at Adobe's help file on the subject [URL] but there I'm confused.

[Code]...

View 2 Replies

ActionScript 3 :: Using Object Pool And Flash?

Jan 25, 2011

When is it a good idea to use an object pool in Flash? For example, is it a good/bad idea with bitmaps, MovieClips (with timeline animations inside of them), video, fonts?

View 1 Replies

Flash :: Object Pool Not Working?

Dec 28, 2011

I'm having trouble setting up my object pool. I created a "BallPoll" custom class to handle the pooling logic. I first call fillPool() to add 20 Ball objects into my array. Then in my document class when I want to create a Ball, I check the pool array. It isn't working and I'm not sure why.

[Code]...

View 1 Replies

Actionscript :: Object Pool Design Pattern?

Nov 22, 2010

Can anyone show an example of the object pool design pattern, as written with Actionscript 3.0?

View 1 Replies

ActionScript 3.0 :: Memory Management With An Object Pool

Sep 8, 2009

I've been trying to figure out how Flash does its memory management regarding object declarations but haven't found anything that describes declarations themselves. [code]Basically I want a pool of declared variables that get instantiated only when a certain type is set. I'd have logic in other functions that figures out what the type is and then does certain things to it, but for now I just wanted to know what kind of memory management Flash does with something like this. Does it do nothing until I actually instantiate it (= new Object()) or will space be set aside once I simply declare it (someObj:Object)?

View 2 Replies

ActionScript 3.0 :: Letting Each User Select Only 1 Item From A Pool?

Dec 4, 2011

I'm working on an 8-user app that runs over a wi-fi network using an XML socket. All of the hardware is located inside a medium sized room in a school building.At the start of the app, each user can select 1 role from a pool of 8. However, the socket connection runs at less than realtime, probably because of latency from the wi-fi, so it's possible for two users to make the same selection at the same time. How would I prevent this?

View 1 Replies

Flex :: Get An Access To A Flash Player`s Events Pool?

Sep 22, 2009

I want trace every event on every object, there is way to do it?

View 2 Replies

Actionscript 3 :: Improve The Realistic Movement Of The Pool Game?

Dec 15, 2010

Here is my pool game engine done in Box2dFlash.I would like to make this simulation more realistic as I received mixed opinion from pool experts.Here is my standard wall setting:

var leftWall = _sim.addBox({x:0.9, y:8.15, width: 0.6, height: 11.5, density: 0, fillAlpha: wallAlpha, lineAlpha: wallAlpha});

And of the ball:

_solidBall_7 = _sim.addCircle({x:ballPosX - (ballRadius * 5) - 0.8, y:ballPosY, radius:ballRadius, density: 0.1, linearDamping: 1, isBullet: true, restitution: 0.7, angularDamping: 5, skin: Solid_Bordo});

What other params I might try to improve the realistic movement of the pool game?

View 1 Replies

ActionScript 2.0 :: Radio Buttons Form - Pool System

Apr 20, 2007

I need a flash form script to post, by php, in sql database. The php all right exists and it works very well but I need the flash form. The form must have 3 radio buttons. The radio buttons form is a part of pool system. I create also a form in html (to check the system pool) and it works. Now I need the simple form in flash yo poste the values (A, B or C) in aby php in sql.

View 3 Replies

Actionscript 3 :: Implement An Object Pool For Flex Data/Item Renderers

Oct 6, 2010

You can hook into the creation of Flex 4 item renderers easily enough (through itemRenderer, or itemRendererFunction) allowing you to pull renderers from a custom object pool, but how would you put those renderers back into the pool?

I understand that layout virtualization does a form of object pooling, but I'd like a way to hook in to that. For example, when an itemRendererFunction has been assigned to a data group with a virtualized layout, item renderer construction is indeed deferred, but the instances are not re-used - I'd like to be able to intervene there, if possible.

But even in the case of normal virtualized renderers (where the instances are re-cycled) it would still be useful to be able to manage the pool manually. Pools could be shared between data groups, for example, to reduce the initial buffer required to populate each group.

Is there any way to know when Flex discards an item renderer instance? I have a sinking feeling that there is just no reliable way to tell - even though perhaps there should be.

View 2 Replies

ActionScript 3.0 :: No Errors But Can't See Sphere

Nov 22, 2009

Code:
package {
import flash.display.Sprite;
import org.papervision3d.cameras.Camera3D;

[Code].....

I've imported the correct folder in my Edit->Prefences->ActionScript 3.0 settings. I've instantiated an object and it compiles, and I'm not getting any errors but, nothing shows up on the screen.

View 1 Replies

ActionScript 3.0 :: Possible To Clear 3d Sphere?

Aug 27, 2010

I'm doing 3d gallery in AS3 and i have run in to huge problem. After ActionScript creates 3d sphere it doesnt go away no mater if i go forward or backwards in timeline.

View 0 Replies

Make My Sphere Constantly Spin?

Apr 9, 2010

I am making a splash screen for a program and I have a picture in my head of a spinning sphere with pictures on it.I've already made my sphere and mapped my design onto the sphere in illustrator, although it is not as clear as I wanted.How do i get the sphere into flash and animate it to spin continuously?

View 1 Replies

ActionScript 3.0 :: Render Sphere From Inside?

Jan 28, 2009

How would you do it? Or, else, how would you create a world? I.e. what I need is to place the sphere in the way the distance form the camera to it's center is less then the sphere's radius.

View 2 Replies

ActionScript 3.0 :: 3D Rotating Sphere Texture?

Dec 29, 2010

i'm trying to achieve the effect of a rotating sphere given a regular 2D texture. the best thing i've seen is a tutorial on emanueleferonato.com which gives this result: emanueleferonato dot com /downloads/mapping09.swf as you can see, it works pretty well when you're moving left/right OR up/down. it fails to simulate realistic rolling when going in any diagonals (since it's a very simplistic illusion). how to render such a sphere given any point on a mercator projection and then have the sphere rotate in an arbitrary (but fixed) direction? this is a bit advanced math stuff.

btw, if anyone's interested, i figured a better displacement map than what is used in the link i showed

i started my search again and immediately bumped into this: [URL] it's library called BitmapSphere and it does exactly what i need it to! also, could admin edit this and put together the link or something? i find it highly annoying that i need 50 posts before being able to post a link

View 7 Replies

Actionscript 3 :: Flash + Box2d Pool Game Breaks Online Because Shots Are Not Transmitted Precisely?

Dec 25, 2010

I'm, working on this pool game: [URL] open it in TWO browser windows you will see that the 2 player modus starts. When you make a shot, every shot gets copied to the other player. Unfortunately it is not precise enough. The player makes the shot with this code:

[Code]..

View 2 Replies

ActionScript 3.0 :: Overlaying 1 Bitmap Image On Another On A 3d Sphere?

May 24, 2009

The basic concept: I want to at runtime overlay (or paste or whatever) one bitmap image asset onto another. The original image asset is a texture on a 3d sphere.Example:3D Sphere with earth texture applied to it. Put a cloud on the earth texture and have cloud move along the earth.

Caveats:Can't use any composite materials because I take a serious perf hit. Want to try working only with bitmaps to see if it is faster.I've gotten this far but don't know how to fill rectangle with jpeg file and certainly have no idea where to go from here..earthBitmap= new BitmapData( 256, 256, true); fillRect will only do a color ... I need what fills a rect with jpeg image and how to edit a bitmap on the fly.

View 2 Replies

ActionScript 3.0 :: Rotate A Sphere With The Mouse On The X And Y Axis?

Nov 6, 2009

I am trying to rotate a sphere with the mouse on the x and y axis but the sphere keeps 'roll'ing and flipping it all around.

package {
import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;

[code]....

View 1 Replies

ActionScript 3.0 :: Equation For Animating A Point Around A Sphere?

Jul 25, 2011

if anyone has any info on animating a point around a "sphere" with actionscript. If anyone has an actionscript equation defining this motion

View 4 Replies

Flex :: Mapping Pictures To A Sphere Or Cylinder?

May 14, 2010

i am developing an application where client can add his photos to appear on a sphere or ball or coffee cup and able to save them and give it for printing using flex. like itasveer.com site. i tried to use away3D but if the image is small it is stretched and added to sphere. i dont want it to strech instead the original image shud appear on the sphere. if it is added to cup it shud cover only the circular part it shud not add this to top and bottom.

View 1 Replies

Actionscript 3 :: Position Plane In Sphere Papervision3d?

Dec 30, 2011

How position plane in sphere papervision3d as3 ?

I have a problem , how position a plane in surface of sphere.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved