Crystal Space
Welcome, Guest. Please login or register.
December 19, 2014, 12:48:01 am

Login with username, password and session length
Search:     Advanced search
9032 Posts in 2046 Topics by 9288 Members
Latest Member: Lorrainewhite
* Home Help Search Login Register
+  Crystal Space
|-+  Associate Projects
| |-+  CEL Discussion
| | |-+  camera zoom
« previous next »
Pages: [1] Print
Author Topic: camera zoom  (Read 5258 times)
Olum
Newbie
*
Posts: 1


View Profile
« on: July 12, 2007, 09:06:41 am »

Hi,

is it possible to zoom the camera (without moving the actor)?
Can you give me a hint how to do this in xml-code?

thanks
Logged
jorrit
Administrator
Hero Member
*****
Posts: 1706


View Profile
« Reply #1 on: July 17, 2007, 08:46:54 am »

The camera property class has a 'distance' property that you can change at runtime. Changing that in xml can be done like this:

Code:
<default propclass="pc(pcdefaultcamera)" />
<property id="propid(distance)" value="3.0" />

Greetings,
Logged
Kriss
Newbie
*
Posts: 49



View Profile
« Reply #2 on: October 25, 2007, 04:58:23 pm »

Since I have similar question among others (they're about XML, not C++ or Python since I don't know much in latter ones):

1.)Is it possible to change "distance" property from keyboard/mouse? (Just want to ask about samples of code, not about the fact itself, if this thing is possible)

2.)And also can anybody explain (or give link to tutorial) how to control camera position (I took pieces of code from XMLParticles.CelZIP, but I'd like to be able to rotate camera around my character and zoom)?

3.)By using code as explained above I somewhy got warnings like this "cel.pcinput.standard: Bad input specification 'mousemove'" Could somebody explain what I did wrong?

4.)Is there an action to switch between run/walk modes (like CapsLock, BTW how to write this key to use it, if it possible of course... And same question for mouse wheel)?

Ok, I know I'm asking many questions at once, But actually it's only a small part of what I want to know and wasn't able to find...
« Last Edit: October 25, 2007, 05:26:18 pm by Kriss » Logged
Darek
Newbie
*
Posts: 48



View Profile
« Reply #3 on: October 25, 2007, 09:18:37 pm »

1. yes
2. you have example in the b2cs exporter - actor.xml template allows move camera
Logged
Kriss
Newbie
*
Posts: 49



View Profile
« Reply #4 on: October 26, 2007, 05:11:32 am »

Thanks Darek, will try it right now...
Logged
Kriss
Newbie
*
Posts: 49



View Profile
« Reply #5 on: October 29, 2007, 01:06:41 am »

Ok, results were like this:

1.) Looks like it whould work... But it doesn't.

2.) I figured out how to rotate camera
In
<event name="bind_input">
 ...
        <action propclass="pc(pccommandinput)" id="actid(Bind)">
          <par id="parid(trigger)" value="z"/>
          <par id="parid(command)" value="camleft"/>
        </action>
        <action propclass="pc(pccommandinput)" id="actid(Bind)">
          <par id="parid(trigger)" value="c"/>
          <par id="parid(command)" value="camright"/>
        </action>
 ...
</event>
and later
      <event name="pccommandinput_camleft1">
        <property propclass="?pccam" id="propid(yawvelocity)" value="1.0" />
      </event>
      <event name="pccommandinput_camleft0">
        <property propclass="?pccam" id="propid(yawvelocity)" value="0.0" />
      </event>
      <event name="pccommandinput_camright1">
        <property propclass="?pccam" id="propid(yawvelocity)" value="-1.0" />
      </event>
      <event name="pccommandinput_camright0">
        <property propclass="?pccam" id="propid(yawvelocity)" value="0.0" />
      </event>

3.) Still not solved, besides CELStart tries to use its own "config" folder instead of my.

4.) CapsLock can be used by writing "caps", am I correct? Other than that I have the only clue to write something like
      <event name="pccommandinput_runmode1">
        <if eval="IsRunning">
          <true>
            <var name="Run" value="0"/>
            <print value="'Running'" />
          </true>
          <false>
          <var name="Run" value="1"/>
          <print value="'Walking'" />
          </false>
        </if>
      </event>
Don't laugh Smiley
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 9.232 seconds with 18 queries.