RESOLVED: lookAt not working on Broomstick

Software: Away3D 4.x

roimatola, Newbie
Posted: 14 September 2011 02:39 PM   Total Posts: 6

Hi, first of all, congratulations for the cool engine.

I’m experiencing a little problem with the lookAt function on broomstick. Regardless of the entity i use, everytime i do this entity.lookAt(_view.camera.position), the entity always disapears. I didn´t touched the camera, so it is still on the 0,0,0 position. I tried to move the camera, give it an up vector, but anytime i touch it, it all goes away. Is anyone experiencing something like that?

   

Avatar
theMightyAtom, Sr. Member
Posted: 14 September 2011 02:48 PM   Total Posts: 669   [ # 1 ]

At the risk of sounding like a broken record did you update…
1. playerglobal.swc
2. Flash player to RC1
3. Away3D from Github?

Sounds like a matrix issue, and they all changed recently…

Good luck!

   

roimatola, Newbie
Posted: 14 September 2011 03:12 PM   Total Posts: 6   [ # 2 ]

I believe so, but i’m rechecking everything. Can you please confirm me the proper links?

I’m getting the away version here: https://github.com/away3d/away3d-core-fp11

and the playerglobal.swc from here http://labs.adobe.com/downloads/flashplayer11.html

I believe that if i had the incorrect player i would’n be able to see any 3D content, but is there any way to check this? The Capabilities.version is giving me WIN 11,0,1,129

   

roimatola, Newbie
Posted: 14 September 2011 03:35 PM   Total Posts: 6   [ # 3 ]

Yo are probably right on the versions problem, i’m also finding that i can´t update a pointLight position, no matter what i do, it always stays lighting at 0,0,0.

   

Avatar
Alejandro Santander, Administrator
Posted: 15 September 2011 01:46 PM   Total Posts: 414   [ # 4 ]

I am using lookAt() on Away3D 4.x a lot, and I can confirm that it is working perfectly.

Please check what theMightyAtom has suggested and let us know if you run into further troubles.

   

roimatola, Newbie
Posted: 19 September 2011 11:00 AM   Total Posts: 6   [ # 5 ]

Hi, i recheck all items referred and i’m getting the same results, can you please check if my assumptions are correct? Maybe i’m downloading everything from the wrong urls.

One think i noticed is that most of the examples using the lookAt are done to the camera, something like view.camera.lookAt(someone.position), and i what i’m trying to achieve is different is someone.lookAt(camera.position)

   

John Brookes, Moderator
Posted: 19 September 2011 12:10 PM   Total Posts: 732   [ # 6 ]

“I didn´t touched the camera, so it is still on the 0,0,0”
default camera position is 0,0,-500

“everytime i do this entity.lookAt(_view.camera.position), the entity always disapears”
This would happen if you used a plane ( and not cube,sphere,cone etc) that didn’t have “bothSides” set on the material as the planes forward points out the back.


“I tried to move the camera, give it an up vector,”
No idea what you mean code?


Rather than us saying “it doesn’t work” (which it does)

How about posting code where it doesn’t work smile

   

Avatar
Fabrice Closier, Administrator
Posted: 19 September 2011 12:13 PM   Total Posts: 1265   [ # 7 ]

PathAnimator uses the same principle (an object looking at the next position along the Path) and it works too. As zeros are in your game here, do you get any changes if you replace the 0’s by a value such as 0.001?

   

roimatola, Newbie
Posted: 19 September 2011 01:22 PM   Total Posts: 6   [ # 8 ]

Ok, sorry if i sounded harsh, it was never my intention.

I reinstalled everything again from scrach, and remade my code from the beggining, and everything is working smooth now. Probably my error was something to do with the hierarchies, has i add something like this:

_ctr = new ObjectContainer3D();
_view.scene.addChild(_ctr);

_planes = new Array();
for(var i:int=0; i

   

John Brookes, Moderator
Posted: 19 September 2011 02:17 PM   Total Posts: 732   [ # 9 ]

Assuming this is a typo
for(var i:int=0; i

   

roimatola, Newbie
Posted: 19 September 2011 02:19 PM   Total Posts: 6   [ # 10 ]

great!! Thanks a lot!

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X