Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 490049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T01:52:11+00:00 2026-05-13T01:52:11+00:00

I’ve looped through the vertices and mapped a plane to each one. I’m having

  • 0

I’ve looped through the vertices and mapped a plane to each one. I’m having problems orientating the planes correctly. I can get it working with a sphere but when i make any alterations to the the primitive – positions are correct but they don’t face/tilt the right way.

EDIT: Note – the alternation to the sphere was done before the sphere was created. I have updated the Sphere class to create an elongated sphere.

The code I’m using to place the planes are as follows:

pivotDO3D = new DisplayObject3D();
scene.addChild(pivotDO3D);
var bigSphere:Sphere = new Sphere(null, 500, 20, 20);

for each (var v:Vertex3D in bigSphere.geometry.vertices)
{
 var __seatmaterial:ColorMaterial = new ColorMaterial(0x000000);
 __seatmaterial.doubleSided = true;
 var p:Plane = new Plane(__seatmaterial, 20, 20, 2, 2);
 pivotDO3D.addChild(p);
 p.position = v.toNumber3D();
 p.lookAt(bigSphere);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T01:52:11+00:00Added an answer on May 13, 2026 at 1:52 am

    The following demo shows how to minimize the problem. I changed the multiplication factor of 0.6 to 2.0 as well as the sphere size in order to exaggerate the effect so you can see it easily. Make sure to change 0.6 to 2.0 in your Sphere.as as well.

    The key is in varying the z location of the target point with the z location of the point on the sphere.

    To compare, run it as-is to see the “fixed” version, and change the lookAt target from pivotDO3D2 to bigSphere to see the old version.

    package
    {
        import flash.display.Sprite;
        import flash.events.Event;
    
        import org.papervision3d.cameras.*;
        import org.papervision3d.core.geom.renderables.*;
        import org.papervision3d.materials.*;
        import org.papervision3d.objects.*;
        import org.papervision3d.objects.primitives.*;
        import org.papervision3d.render.*;
        import org.papervision3d.scenes.*;
        import org.papervision3d.view.*;
    
        [SWF(width='400', height='400', backgroundColor='0x000000', frameRate='30')]
    
        public class PlaneOrientationDemo extends Sprite
        {
            private var scene:Scene3D;
            private var camera:Camera3D;
            private var renderer:BasicRenderEngine;
            private var viewport:Viewport3D;
            private var pivotDO3D:DisplayObject3D;
    
            public function PlaneOrientationDemo()
            {
                viewport = new Viewport3D(0, 0, true, true);
                addChild( viewport );
    
                renderer = new BasicRenderEngine();                         
                scene = new Scene3D( );
    
                camera = new Camera3D();
                camera.z = -700;
                camera.zoom = 50;
    
                pivotDO3D = new DisplayObject3D();
                scene.addChild(pivotDO3D);
    
                var pivotDO3D2:DisplayObject3D = new DisplayObject3D();
    
                var bigSphere:Sphere = new Sphere(null, 150, 20, 20);
    
                for each (var v:Vertex3D in bigSphere.geometry.vertices)
                {
                     var __seatmaterial:ColorMaterial = new ColorMaterial(0x00FF00);
                     __seatmaterial.doubleSided = true;
                     var p:Plane = new Plane(__seatmaterial, 20, 20, 2, 2);
                     pivotDO3D.addChild(p);
                     p.position = v.toNumber3D();
    
                     // This number should match the fx multiplication factor in Sphere.as.
                     var xFactor:Number = 2.0;
    
                     pivotDO3D2.z = v.z / (Math.PI / xFactor);
                     p.lookAt(pivotDO3D2);
                }
    
                stage.addEventListener(Event.ENTER_FRAME, onEnterFrame);
            }
    
            private function onEnterFrame(event: Event): void
            {
                pivotDO3D.rotationX += 1;
                pivotDO3D.rotationY += 1;
                renderer.renderScene(scene, camera, viewport);
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.