modified the line that you requested and still gave error: 1067: Implicit coercion of a value of type away3d.core.math: Number3D to an unrelated type away3d.core.base: Object3D.
if (modelo1.distanceTo (level1.position)> 1) On 29 jul, 14:03, Peter Kapelyan <[email protected]> wrote: > Try this line: > > if (modelo1.distanceTo (level1)> 1) > > change it to this line: > > if (modelo1.distanceTo (level1.position)> 1) > > Let me know if it works! > > -Pete > > > > On Wed, Jul 29, 2009 at 12:53 PM, Wenderson <[email protected]> wrote: > > > This is the address of. The: > >http://groups.google.com/group/away3d-dev/web/Game.as > > > I am studying this very away3d to be good. > > > My error occurs in the following. the > > > : > > . > > . > > . > > . > > > environment = new Plane ((material: mat_ambiente, width: 1900, height: > > 1900, segmentsW: 8, segmentsH: 4)); > > Ambiente.y = - 90; > > View.scene.addChild (environment); > > > ambiente1 = new Plane ((material: mat_ambiente, width: 1900, height: > > 1900, segmentsW: 8, segmentsH: 4)); > > Ambiente1.y = - 90; > > Ambiente1.x = 1900; > > View.scene.addChild (ambiente1); > > > level1 = new ObjectContainer3D (environment, ambiente1); > > View.scene.addChild (level1); > > > Loader = new Object3DLoader (); > > loader = Collada.load ( "data / models / mario.dae", (material: > > mat_loader, scaling: 0.10, y: 40 });// put 40 to see the object > > falling on the stage and the collision sfrendo > > View.scene.addChild (loader); > > Loader.addOnSuccess (success); > > > ) > > / / Success > > private function success (event: LoaderEvent): void > > ( > > modelo1 = ObjectContainer3D (event.loader.handle); > > skinAnimation = (modelo1.animationLibrary [ "default"] the > > AnimationData). SkinAnimation the animation; > > ) > > . > > . > > . > > . > > . > > if (modelo1.distanceTo (level1)> 1) > > ( > > Modelo1.y = modelo1.y; > > ) Else > > ( > > Modelo1.y -= 5; > > ) > > . > > . > > . > > . > > > What I want is to make the "modelo1" stay on top of any > > "level1" (which is where my floor) and when he gets in the dark > > (blakHell) he falls (because there no ground for he step). > > Because I believe in putting a floor with grooves and depressions! > > Thanks for your help! > > -- > ___________________ > > Actionscript 3.0 Flash 3D Graphics Engine > > HTTP://AWAY3D.COM
