| Author |
Message |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 16/08/2008 03:42:24
|
Joe
Joined: 02/06/2008 03:36:22
Messages: 45
Offline
|
Is there a way to get the orbital mode with the CameraController like you have on the Alternativa Player?
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 16/08/2008 04:26:22
|
mike
Joined: 01/06/2008 00:00:06
Messages: 786
Offline
|
The current version of camera controller doesn't support this mode, but there's possibility to get it. Just put a camera inside of another camera and translate the inner camera along negative direction of Z axis, then assign parent camera to a controller and the inner camera to a view. The controller will rotate the parent camera and the inner camera will orbiting around center of the outer one. I must admit, it is a bit weird way to make a camera orbit, but for now there's no other option (except writing your own controller of course). There's a good chance that in the next update of 5.0 version will be new controller with extended functionality including orbital mode.
This message was edited 1 time. Last update was at 17/08/2008 11:47:00
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 21/08/2008 23:10:11
|
Joe
Joined: 02/06/2008 03:36:22
Messages: 45
Offline
|
Cool trick. Works well  I created it into a class (OrbitCamera3D) for anyone interested in using it before the next lib update: Useage: It's contains the CameraController, so call this before you call Scene3D.calculate() : You can also change its focalPoint but calling lookAt or changing its focalPointX, focalPointX, focalPointZ. Heres my example -Joe
This message was edited 2 times. Last update was at 07/11/2008 00:35:11
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 05/11/2008 14:24:04
|
mukherjee78
Joined: 28/10/2008 14:31:34
Messages: 2
Offline
|
Have anyone encountered the mouse wheel issue ?
When ever you scroll the mouse wheel the orbit code is freezing [ ]
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 06/11/2008 04:03:47
|
Joe
Joined: 02/06/2008 03:36:22
Messages: 45
Offline
|
Yes, I just noticed this too. It looks by default a MouseEvent.MOUSE_WHEEL or MouseEvent3D.MOUSE_WHEEL listener is set. I get this error:
Since I don't have access to the Alternativa3D library source, I think were going to need the help of Team Alternativa on this.
So... we need to remove default mouseWheel event, or even better, tie it to my OrbitCamera3D.distance property.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 06/11/2008 07:52:46
|
mike
Joined: 01/06/2008 00:00:06
Messages: 786
Offline
|
Just use WalkController, it hasn't mouse wheel support
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 06/11/2008 08:06:53
|
mukherjee78
Joined: 28/10/2008 14:31:34
Messages: 2
Offline
|
Hats off [ ] it worked [ ]
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 25/11/2008 21:01:02
|
Joe
Joined: 02/06/2008 03:36:22
Messages: 45
Offline
|
Yeah, that worked, but now the focalPointX, focalPointY, focalPointZ, and lookAt(), don't work... What am I missing here?? Here is the update with the WalkController update:
This message was edited 2 times. Last update was at 26/11/2008 22:50:14
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 26/11/2008 21:36:52
|
mike
Joined: 01/06/2008 00:00:06
Messages: 786
Offline
|
Walk controller overrides an object's coordinates now. You should use the "coords" property of a controller instance.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 26/11/2008 22:42:42
|
Joe
Joined: 02/06/2008 03:36:22
Messages: 45
Offline
|
I tried that, but it still doesn't render the new angle when changing the controller's coords? This is what I tried:
It didn't have a problem moving until I switched it to the WalkController to get rid of the mouseWheel error... Is the WalkController making it immobile? If I know how to disable the CameraController's mouseWheel event, I could resolve this...
This message was edited 3 times. Last update was at 26/11/2008 22:55:14
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 27/11/2008 01:01:30
|
mike
Joined: 01/06/2008 00:00:06
Messages: 786
Offline
|
In this case controller.coords acts as a getter and returns an instance of Point3D. To change x coordinate you have to set a new value for x in this instance and assign it back to "coords". I know, this isn't that convenient as simply setting x, y, z via separate properties, but this is how it's working right now.
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 01/12/2008 21:27:07
|
Joe
Joined: 02/06/2008 03:36:22
Messages: 45
Offline
|
OK, now its working Thanks Mikhail. Here is the final OrbitCamera3D for anyone who wants to use it:
|
|
|
 |
![[Post New]](/templates/default/images/icon_minipost_new.gif) 03/05/2009 17:02:25
|
asmalkov
Joined: 03/05/2009 12:18:27
Messages: 1
Offline
|
What if we add
to the buildController() method and also add
to enable mouse wheel zooming?
|
|
|
 |
|
|