Actionscript 3.0 :: Papervision 3D Spaceship Movement?

Jul 22, 2011

I am working on a spaceship flying simulation in PV3D. It's a simple concept, when [SPACE] is pressed, the ship moves forward. The [mouse position] controls the direction the spaceship travels. Similar to this video http:[url].... (though i do not need it to do banks and rolls or anything fancy yet, the video is just to put an image in ur head).I am using these Trig equations to calculate the X, Y, Z velocities,

velocityX = Math.sin (shipdae.localRotationY * Math.PI / 180 ) * speed;
velocityY = Math.sin(shipdae.localRotationX * Math.PI / 180 ) * -speed;
velocityZ = Math.cos(shipdae.localRotationY * Math.PI / 180 ) * speed;

View 1 Replies


Similar Posts:


Actionscript 3 :: Load A Papervision/Flex Application (SWF) As A Material On A Papervision Plane?

Mar 24, 2011

I am trying to build a portfolio application similar to the used by Whitevoid. I am using Flex 4 and Papervision3D 2. I have everything working except for one issue. When I try to load an external SWF as a material on one of the planes, I can see any native Flex or Flash components in their correct positions, but the papervision objects are not being rendered properly. It looks like the viewport is not being set in the nested swf. I have posted my code for loading the swf below.

private function loadMovie(path:String=""):void
{
loader = new Loader();
request = new URLRequest(path);

[Code]....

Below I have posted two pictures. The first is a shot of the application running by itself. The second is the application as a MovieMaterial on a Plane. You can see how the button created as a spark object in the mxml stays in the correct position, but papervision sphere (which is rotating) is in the wrong location.

View 1 Replies

Actionscript 3 :: Rotating The Projectiles ALONG With The Spaceship

Sep 4, 2011

I want my spaceship shoot two shots at once. So I used my first array of projectiles and placed them at the right side of the ship (one shot on the left and one on the right). So far so good. But when I shoot with my spaceship and I turn around the rotations of the projectiles look very strange. It's hard to describe so here's an image that shows the error in action. [URL] I have huge problems rotating the projectiles ALONG with the spaceship so that it looks really good. Currently there is one single shot only. My shooting gets screwed up when I rotate and fire at once. The goal is to create a dual firing cannon like in the picture shown. Here is some code that places the projectile at the left of the ship (that doesn't really work):

[Code]....

View 1 Replies

ActionScript 3.0 :: Add Flames While Spaceship Is Flying?

Aug 10, 2010

Im trying to add flames while my spaceship is flying. When forward button is pressed the flame appears from the center of the ship and when the right or left button is pressed the flame appears from the right or left side of the ship, I tried to use gotoAndStop, but it only shows frame by the last pressed button, if I press two keys at same time I see only one flame. What should I do to see two frames at the same time?

View 4 Replies

IDE :: Create Trail For Sky Rocket/spaceship?

Nov 12, 2009

I�m working on an asteroid game and don�t get it to create a nice trail for my spaceship(s).It doesn�t need to look spectacular, just "nice".I tried a comic look alike version with angled mc�s, whose scale are tweened down and up. But it�s not the right look.And I tried some flame effects by as3, but it not seems to be a smart solution. Nice look, but needs a lot of memory space.

View 2 Replies

ActionScript 3.0 :: Create An Enemy Spaceship That Has A Simple AI?

Jul 31, 2011

i.e. everytime the spaceship reaches a point a new one will be created randomly and the ship is flying to it (etc., etc.)Problem is that it doesn't really work because after the ship flies around for some time it suddenly stops to move. It's a matter of time. Sometimes the problem occurs after 5 seconds then again the spaceships flies around for 2 - 3 minutes and stops the movement immediately.Currently I have no clue where the problem is. I already checked the distance function but so far it seems to be okay

This is the code (just an excerpt):

Code:
private function update(timeDifference:Number = 0):void
{
var step:Number = (timeDifference / 1000) * timeBasedUpdateModifier;
for each (tempEnemy in enemyManager.enemies)

[code]....

View 7 Replies

ActionScript 2.0 :: [MX] Spaceship Control - Rotation & Thrust

Nov 14, 2004

im trying to create a basic spaceship flying game and the first problem ive got is controlling the ship. the controls i need are thrust and left-rotate and right-rotate. much like this, [URL] at the start this tut mentions 'game control tutorials' does anyone know where these are? i think i would find these useful. the above tut doesnt go into scripting. at the moment to control rotation i have,

[Code]...

View 4 Replies

IDE :: Movieclip - Spaceship Will Fly Across The Screen And Then Stop In The Center

Jan 30, 2009

stop a movie clip..... here is my code:

ship_mc.onEnterFrame = function() {
ship_mc._x += 15;
}

What I need is this clip to move until x = 151, then stop. My spaceship will fly across the screen and then stop in the center...how do I make it happen?

View 1 Replies

ActionScript 2.0 :: Create A Basic Spaceship Flying Game And The First Ive Got Is Controlling The Ship?

Nov 14, 2004

im trying to create a basic spaceship flying game and the first problem ive got is controlling the ship.the controls i need are thrust and left-rotate and right-rotate. much like this,[URL]..at the start this tut mentions 'game control tutorials' does anyone know where these are? i think i would find these useful. the above tut doesnt go into scripting.

[Code]...

View 4 Replies

ActionScript 2.0 :: Circular Movement To Linear Movement - Carousel To Conveyer Belt?

Jul 9, 2010

I've been playing with carousel code, and was wondering how to change it from circular animation (carousel) to left/right linear (conveyer belt) style animation, how to change the mover code and 't.angle = i * ((Math.PI*2)/numOfItems);'

[Code]....

View 1 Replies

ActionScript 2.0 :: Flowing Mc Movement Opposite Of Mouse Movement

Feb 12, 2003

I have a mc (fStrip) which looks like a piece of filmstrip with thumbnail images in it. I want this mc to move when the users mouse is positioned over it, but I only want it to move only along it's x-axis and in a direction opposite that of the mouse. And I want it to move or flow smoothly.

I've been trying to figure this out (see my lame attempt below) but without much luck.

onClipEvent (mouseMove) {
buffer=20 //movement buffer
mousePos=_root.fStrip._xmouse //store mouse position
if (mymouse!=_root.fStrip._xmouse){ //if the mouse has moved

[Code].....

View 3 Replies

ActionScript 2.0 :: Ants Movement (based On Snow Movement)?

Jun 22, 2004

I wish to get the effect of ants scuttering across the screen or up a tree, I have not decided which direction yet. I started with the tutorial code for the snow effect from kirupa, and changed it around to fit the little vector ant I created. The way I have it now looks pretty good, but the movement is a little too fluid. They obviously move in sinusoidal paths bc the code tells them to. I have about 20 copies of the main obj, and they're all a little different in size and specs (speed, transparency, etc) but what I was wondering was if there is any way I can change the code to make it a little more hectic, or erratic, not so fluid. If there is no way of doing so, it looks pretty good right now. If there is, however, I think it could look awesome. here's the code I'm using for the object.

onClipEvent (load) {
//stage
movieWidth = 850;
movieHeight = 50;

[code]....

View 5 Replies

ActionScript 3.0 :: 2D Character Movement With Camera Movement

Jun 10, 2011

how to get the camera to move with a character? At the minute he just moves off screen when i press right rather than the camera following him.

View 3 Replies

ActionScript 2.0 :: Set Movement Speed On Any Particular Movement?

Oct 2, 2002

I have a Mogli (Junglebook-like) Character that i got to move with the arrow keys on the keyboard.

I want the character to jump (so for example , he must while moving to the right of the "gamearea" , you must be able to hit a key (say for example the "control" key ) and then the character must jump ( go up ) and as soon as the key is released he must obviously come down.

And also how do one set movement speed on any particular movement.

View 12 Replies

ActionScript 3.0 :: Car Skidmarks In Papervision

Oct 19, 2009

I asked this question in papervision 3d forums, but nobody replied. So. I am writing a 3D application with actionscript 3 and papervision 3D. But I have stuck on one problem, I can't figure out, how to place skidmarks (decals?) on an object. The only method I can think of is drawing directly to BitmapData (texture). What would you suggest to draw a textured skidmark on ground (plane primitive)?

View 1 Replies

Actionscript 3.0 :: Globe Done In Papervision

Jul 2, 2009

I have done globe in papervision - basically sphere + material (image of political map) over it.Now, I need to make every country on my globe interactive, what means, I need somehow create event listeners for lots (at least 15) of small areas on my globe, and if I click those areas, something will happen (say, additional info windowwill come out)I googled a lot and found a lot of things describing some realted stuff (hotspots?), but since I am quite new in flash/actionscript/papervision, could I, please, get some introductory idea how my problem might be solved?

View 1 Replies

Actionscript 3.0 :: Put Text In Papervision?

Jul 27, 2009

i was trying to put text in papervision but am having touble.

View 4 Replies

Get Papervision Development Tool?

Aug 21, 2009

Is there any development tool that has the papervision3d classes buit-it, so i can get hints when i'm writing th code as i get hints for as3 code?

View 2 Replies

IDE :: Importing 3d Animation With Papervision

Feb 12, 2009

I am new to Papervision, and am experimenting on importing animated 3ds max models into my project.I can export a model (with no animations) into Collada format, and import it using Papervision, with no problems. But when I try to import a model with animations, i get this error:[code]I am using Flash CS 4 / Papervision3D Public Beta 2.0 - Great White / 3D Studio Max 2009 (with the New Collada Plugin).

View 7 Replies

ActionScript 3.0 :: PaperVision 3D .. CPU Performance?

Jan 4, 2011

I am trying to develop a game based on papervision and flash.the very basic idea of the game is that some 3D objects are falling from the sky and you have to catch them .. At a time there can be as many as 20 of such 3D objects on the stage.Now the problem is that these 3D objects are causing too much CPU usage .. I was hoping if there was another way to do the same thing and which causes less of performance issues ...

1.I have two classes suppose A and B

2.the class A calls class B

3.class B initiates a 3D sphere whenever it is called .. the Sphere has a bitmap image material .. and it rotates along the X axis on every enter frame event

4.class A has a timer function which moves the 3D object in the Y direction and also destroys it when the object reaches a specified Y position ..here are the code snippets ...

Class A :Code:
public function onTick(e:TimerEvent)
{
if(Math.random() < spawnrate)[code]......

View 2 Replies

ActionScript 3.0 :: Where To Put The Material Jpg [papervision]

Apr 11, 2011

trying a simple papervision tutorial and swf stops rendering by mat = new MovieMaterial(rec);

[Code]...

View 2 Replies

ActionScript 3.0 :: Setup Planes With Papervision?

Oct 30, 2009

how to setup Planes with papervision, then retrieve them later?I've set up the 3d scene like this:

PHP Code:

var con:Sprite = new Sprite();
con.x = this.width * 0.5;
con.y = this.height * 0.3;
holder.addChild(con);

[code]....

but none of these methods seem to work,, possibly because you can't do the same things to Planes that you can to movieclips...(?)the scene.numChildren seems to work though.

View 1 Replies

Flex :: Rendering Glitches With Papervision?

Oct 31, 2009

Has anyone seen rendering glitches with Papervision?

seee the flash movie at [URL].. which demonstrates the problem.

View 2 Replies

Flash :: SWF Loading In An SWF Containing A Papervision Scene

Apr 25, 2010

I have an SWF loading in an SWF containing a papervision scene.I've done it before yet problem is, I get an error - I'm not sure what the issue really is.[code]

View 3 Replies

Flash :: Importing DAE Files To Papervision?

Sep 14, 2010

i created a 3d model using sketchup and exported it as a DAE file.

then i try to import the model into papervision, but the model never appear.

when i use the DAE file provided in the examples, it works. only when i tried to create my own models, it doesn't work. does this have anything to do with sketchup?

View 2 Replies

Flash :: Using Papervision To Create A 3d Game

Oct 22, 2010

now i need to add a health bar and countdown timer on the screen. how am i going to do it? adding a plane in the 3d scene? the health bar is always on the top right corner of the screen. is there anyway of NOT using 3d concept to implement this. i mean i could do it with a plane keep changing it's texture to show the status of the character. is there any cleaner way of doing it?

View 1 Replies

Flash :: Papervision 3d Development Alive?

Dec 18, 2010

So I wonder if papervision 3d development alive? Any google code or ght..?

View 1 Replies

Actionscript 3 :: Create A Carousel With Papervision?

Jan 23, 2011

how to create a carousel like his with papervision. I created one but the planes just go round and round. I was wondering if it's possible for the planes to keep the same angel as the example of the link. I do not want the plane to rotate itself on the y axis but just move on the X/Z axis just going around an object in the middle.

View 1 Replies

Flash :: Having Simple Buttons In Papervision

Jul 22, 2011

there's a simple thing in papervision I can't do , I want to have a simple button on my swf like we have in flash , just a 2d square which is on screen and you can click on it and have some action

View 1 Replies

ActionScript 3.0 :: Error 1009 Using Papervision

Aug 29, 2010

why I get an Error #1009("cannot access a property or method of a null object reference at at rain3D/createScene() at rain3D()"] using this simple code:

ActionScript Code:
package{
import flash.events.Event; 
import org.papervision3d.view.BasicView;

[Code]....

If I try to render a single sphere I haven't problems. But when I use the "for" cycle I get the error.

View 4 Replies







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