[Patch] ChaseCamera feature request (setChasingEnambled(boolean arg))

Hi all.



As far as i understand, @neon has writen the ChaseCamera class. So i have a feature request to you about “Chasing” when softMotion is enabled.



Can you add the method to disable the Chasing? At present we have only setChasingSensitivity() method. But we cannot disable the Chasing.



All I need is just to add “void setChasingEnambled(boolean arg)” method to enable/disable the Chasing.

This method will disable lines 415-423: http://code.google.com/p/jmonkeyengine/source/browse/trunk/engine/src/core/com/jme3/input/ChaseCamera.java#415



Thanks.

@mifth

You’ve got a contributor tag. What you want is simple. Make your mod then submit it. When/if @nehon accept it you can commit it. It’s the best and fastest way. Also, I prefer when Nehon works on implementing/fixing something important than add something we, underlings, can easily do. :wink:

ok, where should i submit my modification?

Once it’s done diff it here, tag Nehon. He should respond fairly fast. :slight_smile:



Also, tag your post with [Patch] as this helps.



Here’s an example.

1 Like

Ok, thanks @madjack . @nehon i did the patch to the ChaseCam class. Can you review it?



here is my diff file: http://dl.dropbox.com/u/26887202/JME/chasecam.diff

here the text:

[patch]


This patch file was generated by NetBeans IDE

This patch can be applied using context Tools: Apply Diff Patch action on respective folder.

It uses platform neutral UTF-8 encoding.

Above lines and this line are ignored by the patching process.

83a84

> protected boolean chasingEnabled = false;

415c416

< if (chasing) {



> if (chasing && chasingEnabled) {

643a645,661

> * returns true if the chasing is enabled

> * @return

> */

> public boolean isChasingEnabled() {

> return chasingEnabled;

> }

>

> /

> * Enable the camera chasing : The camera smoothly go in the targets trail when it moves.

> * Only has an effect if smoothMotion is set to true

> * @param chasingEnabled

> */

> public void setChasingEnabled(boolean chasingEnabled) {

> this.chasingEnabled = chasingEnabled;

> }

>

> /




[/patch]

Actually i don’t get it…

  1. Your code does not disable chasing…which IMO is a good thing since it’s a chaseCamera.
  2. you can achieve the same effect as your code does by setting chasingSensitivity to 0.

If i set sensitivity to 0 so camera will stay on its place and the aimObject will fly away. Far, far, far away…



For some reasons i don’t need smooth chasing, but i need smooth rotation. That’s why i need to turn smooth chasing off.