Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > General > Animation and Effects

Reply
 
Thread Tools Rate Thread Display Modes
Old 06-11-2002, 01:17 PM   #1
rgarimella
Registered User
 
Join Date: Jun 2002
Posts: 12
Default adding a tilt angle

Hi All,

I was Planning to Move a Sphere on a YZ or XZ plane. With the code below, I can only move it on the Z Axis. Any ideas how i can add an tilt angle to it.

Thanks in advance. The code is from a tutorial on this site.
Ravi

onClipEvent(load){
radius = 200;
perspective=500;
degrees=0;
}

onClipEvent (enterFrame){
angle=degrees * (Math.PI/180);
degrees += 2;

xposition=radius*Math.cos(angle);
zposition=radius*Math.sin(angle);
distance = 1 /(1-(zposition / perspective));
this._x=(xposition * distance) + _root.center_cross_hairs._x;
this._y=_root.center_cross_hairs._y;

this._xscale = distance * 100;
this._yscale = distance * 100;
_root.center_cross_hairs._visible=0;
}
rgarimella is offline   Reply With Quote
Old 06-11-2002, 01:34 PM   #2
pinkaboo
power to the pinK
 
pinkaboo's Avatar
 
Join Date: Jul 2001
Location: Atlanta Atlanta ATLANTA!
Posts: 1,527
Send a message via ICQ to pinkaboo
Default

[crosspost]

other thread
pinkaboo is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
adding button functions to MovieClips? alphadork Simple Stuff (Newbies) 6 03-17-2006 08:40 PM
detecting 'terrain' angle P]-[IL ActionScript 2.0 0 02-17-2004 09:50 PM
Angle Help arai_speed ActionScript 1.0 (and below) 0 01-09-2004 04:20 PM
calculating a title angle rgarimella ActionScript 1.0 (and below) 0 06-11-2002 01:25 PM
Bouncing at an angle Andrue ActionScript 1.0 (and below) 1 10-28-2001 05:22 AM


All times are GMT. The time now is 08:26 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.