This is G o o g l e's cache of http://www.flashsandy.org/forum/lofiversion/index.php/t348.html as retrieved on 20 Jul 2007 19:32:54 GMT.
G o o g l e's cache is the snapshot that we took of the page as we crawled the web.
The page may have changed since that time. Click here for the current page without highlighting.
This cached page may reference images which are no longer available. Click here for the cached text only.
To link to or bookmark this page, use the following url: http://www.google.com/search?q=cache:T8UlN6HHPQkJ:www.flashsandy.org/forum/lofiversion/index.php/t348.html+site:www.flashsandy.org+index.php&hl=en&ct=clnk&cd=99


Google is neither affiliated with the authors of this page nor responsible for its content.
These terms only appear in links pointing to this page: index php

failsafe
Hello, great app.

Is there any way to rotate an object so that one side is always facing a moving/rotating camera? I am making a first person walkthrough, and I have trees skinned on simple boxes with no width. The trees are cartoony looking, and do not need real depth. The skinned boxes are 25, 50, 0 ( I tried making vertical planes, but they would not skin correctly ). I only want to see the "front" side of the box, but I do not want to skew the box when looked at an angle since it looks odd when it is 0 units wide.


I have no idea what math would be needed to find the degree of rotation based on the object and the camera's current position... Any ideas?
kiroukou
Hi,

Well it is a translation that you should do wink.gif

Look at a circle equation :
posX = radius * cos(angle)
posZ = radius * sin(angle)
Y would stay identcal if I unerstand you correctly.
Angle for be a variable going from 0 to 2 * PI
Or something like that smile.gif

Petit
QUOTE(failsafe @ Feb 28 2007, 09:32 PM) *

Is there any way to rotate an object so that one side is always facing a moving/rotating camera?

An alternative, if I understand you right, would be to use a Sprite2D.
Such a creature always turns the same side to the camera, and it may be skinned with a TextureSkin.
A tree image would always look the same, apart from having a size depending on the distance to the camera.

Just a thought smile.gif
failsafe
QUOTE(Petit @ Feb 28 2007, 04:15 PM) *

An alternative, if I understand you right, would be to use a Sprite2D.
Such a creature always turns the same side to the camera, and it may be skinned with a TextureSkin.
A tree image would always look the same, apart from having a size depending on the distance to the camera.

Just a thought smile.gif


That works perfect... But not in 1.2 mad.gif I'm using 1.2 to try and limit the number of trees at any given time using enableClipping ( true ).

Although, I haven't seen any performance increase doing so when using 50 trees or more... So I'll go back to 1.1 use sprite2D instead of a box and ignore clipping, I suppose.

Is there any way to increase fps when using a very large area and things "should" be off your field of vision ( including behind you ) in either 1.1 or 1.2?
failsafe
Here's the what I'm working on. This one is 1.1 with 50 trees randomly plotted. Use wsad or arrow keys to move. Drag left mouse button to turn.

http://www.failsafedesign.com/sandy/


Oddly, sometimes trees disappear and reappear during movement... Any ideas on this?
Petit
QUOTE(failsafe @ Mar 1 2007, 03:49 AM) *

Here's the what I'm working on.
Is there any way to increase fps when using a very large area and things "should" be off your field of vision ( including behind you ) in either 1.1 or 1.2?
Oddly, sometimes trees disappear and reappear during movement... Any ideas on this?

Hey, beautiful!
Fine trees, although obviously cloned, and that sky is really nice.

Objects that are outside the viewport in 1.2 or outside the ClipScreen in 1.1 are regarded not visible and are not drawn. The same applies to objects behind the camera. The advantage with 1.2 in this regard would be to use frustum clipping, to avoid drawing objects too close to the camera or too far away.
But then you had problems with the Sprite2D in 1.2, so that may not be feasible until a stable 1.2 is released.

If you are using the Flash IDE, you can set the fps value at maximum, 120 fps, to make things faster.

I cannot see the mysterious disappearance / appearance of trees on my machine.
It shouldn't be a Sandy case, but may depend on player version and/or computer capacity.
Does it happen even at slow speed of motion or only at higher speed?
failsafe
Thanks! The trees will eventually be unique combinations of tree "parts", then stored into a database for poistion and look.

As for the disappearing, it happens at any speed. Some trees seem to disappear while the camera is in any type of motion, then reappear once the camera stops. Others do the exact opposite; hide when stopped and are visible during motion.

It seems to happen after a bit of running around, since it never happens right at the start. I almost think it happens to the trees that the camera passes through, and when you turn around to re-view that tree, it will be hidden during motion. But I haven't been able to define exactly when it happens.
kiroukou
Hi,
current 1.2 culling has some problems. It is now 100% stable. But it will be with the next corrections. And I havent't done some tests but I expect you to be ablr to display more than 50 trees wink.gif In AS3 I was able to draw 1000 Sprites2D with a correct fps smile.gif

I can see your problem of visible/hidden sprite... Strange. It occurs at the extremity of the screen right? And it is 1.1 ?

Sorry no advice here, execpt to permanantly do something that disable the cache, like camera.moveForward(0) or something equivalet.

++
Petit
QUOTE(failsafe @ Mar 1 2007, 11:34 PM) *

As for the disappearing, it happens at any speed. Some trees seem to disappear while the camera is in any type of motion, then reappear once the camera stops. Others do the exact opposite; hide when stopped and are visible during motion.

Hey, I did a stress test, that is run around in the woods for quite a while, passing through trees and turning around. I couldn't make a single tree disappear for the briefest moment ( unless the bastards fooled me when I blinked wink.gif. I'm using Flash Player 9 on windows.
failsafe
Hm. Interesting that you couldn't get them to do it.

For me it occurs on all parts of the screen, not just the extremities. And it is 1.1 right now. I'd love to use 1.2 for the culling, but haven't had luck with displaying sprite2d in 1.2.

I know you probably get this often, but any idea when an AS3 1.2 will be in beta at least? I'd love to be able to get 1000 sprite2d with no fps loss. But this project does have a timeline, and if I have to make "groups" of 50 then that's the way I'll have to build it.


Also, updated the url with some changes to camera focal length and added more trees with more bunching. The disappearing act seems to happen more now with tighter groups. Try alot of going and stopping maybe?
Petit
QUOTE(failsafe @ Mar 2 2007, 12:08 AM) *

Hm. Interesting that you couldn't get them to do it.
Also, updated the url with some changes to camera focal length and added more trees with more bunching. The disappearing act seems to happen more now with tighter groups. Try alot of going and stopping maybe?

Oh man! That's a lot of trees!

But, you may not believe me, not one single tree disappears for me, except when they get behind me.
I'm flying happily around like a bee - bzzzzz. cool.gif

failsafedesign was it? rolleyes.gif [Edit: I mean it really is]
failsafe
QUOTE(kiroukou @ Mar 1 2007, 02:36 PM) *

current 1.2 culling has some problems. It is now 100% stable. But it will be with the next corrections. And I havent't done some tests but I expect you to be ablr to display more than 50 trees wink.gif In AS3 I was able to draw 1000 Sprites2D with a correct fps smile.gif



I've been looking at AS3 in the past couple days, doesn't seem too bad. Wouldl it be possible for me to port this fla to AS3 using the current 1.1/1.2beta version of sandy? Or do the sandy .as files all need to be updated as well?

Nevermind, answered my own question by trying to open it in the 9 alpha...
kiroukou
no you need an AS3 version of Sandy to do that sorry.

++
zeusprod
QUOTE(Petit @ Mar 1 2007, 05:44 PM) *

Hey, I did a stress test, that is run around in the woods for quite a while, passing through trees and turning around. I couldn't make a single tree disappear for the briefest moment ( unless the bastards fooled me when I blinked wink.gif. I'm using Flash Player 9 on windows.


When a tree disappears in cyberspace and there is no one there to see it, does it make a sound? ;-)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2007 Invision Power Services, Inc.