Modification class HoverDragController by David Lenaerts

Software: Away3D 4.x

Krappt, Newbie
Posted: 01 April 2013 02:40 PM   Total Posts: 27

Hello!

I use a class that wrote David Lenaerts, but I need to make some changes.

http://away3d.googlecode.com/svn/trunk/broomstick/Examples/Away3D/as/src/HoverDragController.as

1. Necessary to put a limit on the rotation on the vertical axis (Y) of 15 degrees.
2. I need to add the ability to move the displayed part of the scene, by analogy with the parameters moveDown, moveUp, moveLeft, moveRight.

Please help me figure out to how to implement it.

I will be very grateful for your help.

   

Avatar
Fabrice Closier, Administrator
Posted: 01 April 2013 03:15 PM   Total Posts: 1265   [ # 1 ]

The engine codenamed “broomstick” and the compagnon examples are old.
We do not use google svn anymore.
You should use the builds from github (master branch 4.0.11 gold or dev 4.1 alpha). Same for examples.

In both versions controllers:HoverController have getters for tilt, maxTitAngle, minTilAngle. Same for panAngle.

You can if you want to move the lookatTarget position, use lookAtPosition or lookAtTarget. Either ways use the camera vectors to offset one of these.

   

Krappt, Newbie
Posted: 01 April 2013 03:42 PM   Total Posts: 27   [ # 2 ]

https://github.com/away3d/away3d-examples-broomstick/blob/master/src/HoverDragController.as

Here’s a version on github, but it is no different.

You can tell if there are alternative solutions for the camera control in Away3d 4.1 Alpha?

   

Avatar
Fabrice Closier, Administrator
Posted: 01 April 2013 04:53 PM   Total Posts: 1265   [ # 3 ]

just try… in OOP that’s called inheritance.

   

Krappt, Newbie
Posted: 02 April 2013 09:35 AM   Total Posts: 27   [ # 4 ]

Can you give some examples of that work in Away3d 4.1 Alpha?

   

Avatar
Fabrice Closier, Administrator
Posted: 02 April 2013 09:48 AM   Total Posts: 1265   [ # 5 ]

go to git away3d, select the repo examples f11. Like you did for away3d, set the dropdown to dev. You will have then access to 4.1 examples.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X