Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3509 Members - Latest Member: lioneltenel

27. May 2012, 02:48:13 am
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)FPIH Manipulation
Pages: [1]
Print
Author Topic: FPIH Manipulation  (Read 767 times)
AotFSteven
developers
Enjoying the stay
***
Offline Offline

Posts: 63


View Profile
« on: 11. January 2008, 09:42:30 pm »

First off, sorry if this should be a part of this thread http://xith.org/forum/index.php/topic,759.0.html

Anyways, I had a question about manipulating the FPIH so that on mouse movement it does not rotate the avatar.  The scenario is that I am trying to implement a point and click interface. I want the view to be able to be rotated around the avatar, but I obviously don't want the avatar to be rotated. By the way, I am calling setMouseMovementSuspended(false) on right mouse button press and then I suspend again when the right mouse button is released.  I am having a hard time trying to understand all that is going on in the update method in FPIH and it isn't helping that I can't really trace through at specific times/situations because of how many times update is called.  I tried changing it so that the updateAvatars function was only called when the mouse was not moving and this seemed to work because when I was moving the mouse it would rotate the view but not the avatar. However, when I released the right mouse button the avatar would move in a seemingly random direction and sometimes even downwards which would quite often place it through the ground and then falling.  I think that this is happening because the view is getting transformed/translated but the avatar isn't and then when it gets transformed/translated based on the view it appears to go crazy.  I was hoping that someone could clarify this for me and/or let me know if they have been able to do something like this (and maybe even share some code Grin).  I was thinking that in order to get this to work there would have to be different transforms for both the mouse generated and the keyboard generated (and maybe scroll generated too) and then when updating the avatars instead of using the view to transform/translate the applicaple vectors created by the mouse and/or keyboard (and/or scroll) would be.  In this way there could be a setting that would allow the avatars to be updated on certain events rather than all.

I hope that all of that makes sense and thanks for bearing through that long post Smiley
Logged
Pandaemonium
Enjoying the stay
*
Offline Offline

Posts: 85


If at first you don't succeed; call it version 1.0


View Profile
« Reply #1 on: 11. January 2008, 09:49:01 pm »

I'm running into a similiar issue as I also want to be able to rotate the view around an avatar without actually rotating the avatar.

It seems that there should be a flag on the fpih that determines whether the avatar's transformation should be synced with the main view. I'm not sure of all the implications, but just a thought.
Logged
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #2 on: 11. January 2008, 10:01:19 pm »

I'm not sure, if I really understood all this. But as far as I understand you, you should be find by simply creating your own AvatarTransform implementation, where the rotation is not used (or only used in certain circumstances). Just have a look at the DefaultAvatarTransform code for an example.

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic