|
It is currently Thu Sep 02, 2010 2:47 pm
|
View unanswered posts | View active topics
|
Page 1 of 1
|
[ 7 posts ] |
|
| Author |
Message |
|
Don9of11
Joined: Sun Aug 30, 2009 6:31 pm Posts: 65
|
 primitive plane setup
With my first post I need help setting up a plane. I have downloaded the latest Papervision files from Google and I am using Flash CS3. I want to set up my plane so it is pitched from the horizontal about 30 degrees or an isometric view of a plane. Most of the planes I have seen in tutorials are vertical. How do you set the plane so it is horizontal?
|
| Sun Aug 30, 2009 6:55 pm |
|
 |
|
yrunts
Joined: Sat Aug 29, 2009 10:30 am Posts: 2
|
 Re: primitive plane setup
Plane has properties x, y, z and rotationX, rotationY, rortationZ. Also you can use method - yaw();
|
| Mon Aug 31, 2009 2:35 pm |
|
 |
|
Don9of11
Joined: Sun Aug 30, 2009 6:31 pm Posts: 65
|
 Re: primitive plane setup
I am trying to set some buttons with rotation, pitch and yaw functions but when I click the button nothing happens. Do these need to be in a onEnterFrame event or something? Code: -
- var plane:Plane = new Plane(mm, 400, 400, 10, 10);
- scene.addChild(plane);
-
- //plane.pitch(70);
- //plane.roll(0);
- //plane.yaw(0);
-
- // render the plane
- renderer.renderScene(scene, camera, viewport);
-
- //button controls
- rotateX_btn.addEventListener(MouseEvent.CLICK, rotateAboutX, false, 0, true);
- rotateY_btn.addEventListener(MouseEvent.CLICK, rotateAboutY, false, 0, true);
- rotateZ_btn.addEventListener(MouseEvent.CLICK, rotateAboutZ, false, 0, true);
- pitch_btn.addEventListener(MouseEvent.CLICK, pitchUp, false, 0, true);
- roll_btn.addEventListener(MouseEvent.CLICK, rollLeft, false, 0, true);
- yaw_btn.addEventListener(MouseEvent.CLICK, yawY, false, 0, true);
-
-
- function rotateAboutX(evt:MouseEvent):void{
- plane.rotationX += 20;
- };
-
- function rotateAboutY(evt:MouseEvent):void{
- plane.rotationY -= 20;
- };
-
- function rotateAboutZ(evt:MouseEvent):void{
- plane.rotationZ -= 20;
- };
-
- function pitchUp(evt:MouseEvent):void{
- plane.pitch(20);
- };
-
- function rollLeft(evt:MouseEvent):void{
- plane.roll(20);
- };
-
- function yawY(evt:MouseEvent):void{
- plane.yaw(20);
- };
-
-
-
|
| Wed Sep 09, 2009 6:38 pm |
|
 |
|
Don9of11
Joined: Sun Aug 30, 2009 6:31 pm Posts: 65
|
 Re: primitive plane setup
I managed to get a material to map to a plane and I created buttons which let me control the pitch, yaw and roll and those are working correctly now. But I need a little more interactivity. First how do I change the material from one kind to another? Suppose I have two buttons each represent a different material. If I click on one how do I tell papervision to switch the material?
|
| Thu Sep 10, 2009 11:13 pm |
|
 |
|
Don9of11
Joined: Sun Aug 30, 2009 6:31 pm Posts: 65
|
 Re: primitive plane setup
I think I figured out how to switch materials. I now have another issue. I have a room image that I want to place over top of my papervision. In my flash movie the room is in the top layer but the scene appears over top of it.
Is there away to put the 3d scene or the room above?
Attachments:
screen1.jpg [ 11.06 KiB | Viewed 364 times ]
|
| Fri Sep 11, 2009 1:08 pm |
|
 |
|
John Brookes
Forum Administrator
Joined: Sat Mar 07, 2009 9:59 pm Posts: 1107
|
 Re: primitive plane setup
if you put your flash stuff before you setup/init your PV scene it will appear behind. If you do it after then it will be in front. Or use addchildAt()
|
| Fri Sep 11, 2009 3:18 pm |
|
 |
|
Don9of11
Joined: Sun Aug 30, 2009 6:31 pm Posts: 65
|
 Re: primitive plane setup
I don't understand. The room image is a movieClip I took from the library and I placed it on the stage. Is this not the correct way to do this?
|
| Fri Sep 11, 2009 3:24 pm |
|
 |
|
|
Page 1 of 1
|
[ 7 posts ] |
|
Who is online |
Users browsing this forum: No registered users and 4 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|