OnAminate changes camera position !

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
tft67
Posts: 19
Joined: Sat Nov 08, 2008 2:56 am

OnAminate changes camera position !

Post by tft67 »

I've only camera Maya,
and its position is changed after smgr->drawAll()!

It seems that it's the function "onAnimate" ( executed in drawAll )
which changes the position.

// Before : 15,0,0
cameraMaya ->OnAnimate( 0 ) ;
// cameraMay is a irr::scene::ICameraSceneNode
// After 75, 0,0

smgr->drawAll();

May be it's only a wring parameter ?

I put here the xml generated, if someone can help !


[code]
BEFORE
<node type="camera">

<attributes>
<string name="Name" value="" />
<int name="Id" value="-1" />
<vector3d name="Position" value="75.000000, 5.000000, 5.000000" />
<vector3d name="Rotation" value="0.000000, 0.000000, 0.000000" />
<vector3d name="Scale" value="1.000000, 1.000000, 1.000000" />
<bool name="Visible" value="true" />
<enum name="AutomaticCulling" value="box" />
<int name="DebugDataVisible" value="0" />
<bool name="IsDebugObject" value="false" />
<vector3d name="Target" value="5.000000, 5.000000, 5.000000" />
<vector3d name="UpVector" value="0.000000, 1.000000, 0.000000" />
<float name="Fovy" value="1.256637" />
<float name="Aspect" value="1.600000" />
<float name="ZNear" value="1.000000" />
<float name="ZFar" value="3000.000000" />
<bool name="Binding" value="false" />
</attributes>

<animators>
<attributes>
<string name="Type" value="cameraMaya" />
</attributes>
</animators>
</node>

[/code]

And after :
[code]
<node type="camera">

<attributes>
<string name="Name" value="" />
<int name="Id" value="-1" />
<vector3d name="Position" value="13.345222, 2.460011, 4.315732" />
<vector3d name="Rotation" value="0.000000, 0.000000, 0.000000" />
<vector3d name="Scale" value="1.000000, 1.000000, 1.000000" />
<bool name="Visible" value="true" />
<enum name="AutomaticCulling" value="box" />
<int name="DebugDataVisible" value="0" />
<bool name="IsDebugObject" value="false" />
<vector3d name="Target" value="5.000000, 5.000000, 5.000000" />
<vector3d name="UpVector" value="0.000000, 1.000000, 0.000000" />
<float name="Fovy" value="1.256637" />
<float name="Aspect" value="1.600000" />
<float name="ZNear" value="1.000000" />
<float name="ZFar" value="3000.000000" />
<bool name="Binding" value="false" />
</attributes>

<animators>
<attributes>
<string name="Type" value="cameraMaya" />
</attributes>
</animators>
</node>
[/code]
tft67
Posts: 19
Joined: Sat Nov 08, 2008 2:56 am

worng order

Post by tft67 »

sorry, but the xml sample i've put are in the wrong order. !
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yes, the Maya cam is meant to orbit around an object, which can lead to position and rotation updates. That's by design, but can lead to strange effects.
tft67
Posts: 19
Joined: Sat Nov 08, 2008 2:56 am

MAYA cam

Post by tft67 »

I've the seam problem with FPS cam.
I searched a long time for a parameter to change, and didn't found.
How can i recover the previous position of the camera ?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You just need to store it if you want to access some previous value. The FPS cam is meant to change position based on key presses
Post Reply