|
| 3wme |
Post
#1
|
|
Member Group: Members Posts: 20 Joined: 27-February 07 Member No.: 846 |
I'm
looking into sandy 1.2, partly because the forced depth facility sounds
great. I have a plane3D as the floor, which should abvously always be
at the lowest depth. I've tried it out but the floor still is sometimes
at a higher depth than the other object.
CODE floor.enableForcedDepth(true) floor.setForcedDepth(1 ) if you leave it at the default depth (0) it is invisible. I tried adding a check in the render method as another person suggested, forcing the depth of the plane3D to 1. I traced out the depths of the two objects, and the plane3D depth was lower, but it still sat higher than the other object. Has anyone used this property successfully? Attached File(s) |
| kiroukou |
Post
#2
|
|
Administrator Group: Root Admin Posts: 865 Joined: 12-June 06 Member No.: 1 |
Hi,
It is possible for some reasons that the depth of an object exceed 1. That's why I recommend you to set a value of 2 to the forced depth to be sure of that! After that, it is very interessting for non moving camera on the Y axis. ++ (IMG:style_emoticons/default/wink.gif) |
| 3wme |
Post
#3
|
|
Member Group: Members Posts: 20 Joined: 27-February 07 Member No.: 846 |
Maybe
I'm not explaining this very clearly. I want to force the floor plane
to always be at the lowest depth. Setting the depth to 1 would seem to
be the lowest depth possible. But if you look at the swf I attached in
the previous post: click the 'in' button. the camera moves on the y
axis, and the floor is set to a higher depth than the other object?
Perhaps I'm not setting the property properly? Is there any sample that
uses the forced depth value?
|
| 3wme |
Post
#4
|
|
Member Group: Members Posts: 20 Joined: 27-February 07 Member No.: 846 |
I've
attached 2 swfs to demonstrate the problem. If the higher object is
translated back on the z axis, the z sorting doesnt seem to work. I
thought forced depth would take care of that?
Attached File(s) |
| madchild |
Post
#5
|
|
Newbie Group: Members Posts: 1 Joined: 9-February 07 Member No.: 783 |
if
you still have the prob try this: change the sortmethod in __render()
of World3D.as to aF.sortOn( ["_forcedDepth", "depth"], Array.NUMERIC |
Array.DESCENDING ); that helped me out
|
| kiroukou |
Post
#6
|
|
Administrator Group: Root Admin Posts: 865 Joined: 12-June 06 Member No.: 1 |
thanks madchild for the trick.
I must say that I don't know why this can happen since the depth value shall be overriden by the forcedone before render time. What beta are you using? ++ |
| Lo-Fi Version | Time is now: 19th July 2007 - 10:54 PM |