Author Topic: SetDirection Bug ??  (Read 1831 times)

0 Members and 1 Guest are viewing this topic.

Steph3D

  • Capo Regime
  • ***
  • Posts: 399
SetDirection Bug ??
« on: March 05, 2008, 09:23:18 AM »
Si je transmets la direction SetDirection à un autre objet identique, je n’obtiens pas le même résultat  :etonnes:
L'objet tourne pas vraiment dans le meme sens  :gratgrat:

<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
<demoniak3d version="1.0">

<scene name="BASIC SCENE" display_infos="FALSE" display_fps="TRUE" show_ref_grid="TRUE" >
   <background_color r="0.3" g="0.3" b="0.3" /> <window_size width="1024" height="768"/>
   <check_hardware_caps oglsl="TRUE"
  error_message="Sorry, this demo requires OpenGL Shading Language support.
                 Demo startup failed. Bye..." />
  <fog  color_r="1.0" color_g="1.0" color_b="1.0" color_a="1.0" type="EXP2"
   start="0.0" end="1.0" density="0.002" active="FALSE" />
</scene>

<camera name="Camera01" display_position="TRUE" navigation_mode="FLY">
   <position x="0.0" y="50.0" z="170.0" />
   <lookat x="0.0" y="0.0" z="0.0" />
</camera>

<mesh name="box1"
   render="TRUE"
   shape_type="BOX"
   lighting="FALSE"
   texturing="FALSE"
   polygon_mode="SOLID"
   shading_mode="FLAT"
   shadow_caster="FALSE"
   use_vbo="FALSE"   auto_spin="TRUE"
   improve_specular_highlights="TRUE" >
   <attach_material name="m01" />
   <box width="30.0" height="30.0"   depth="30.0" w_segs="5" h_segs="5" d_segs="5" />
   <position x="0.0" y="0.0" z="0.0" />
   <orientation ang="0.0" x="0.0" y="0.0" z="0.0" />
   <orientation_pitch_yaw_roll pitch="0.0" yaw="0.0" roll="0.0" />
   <spin_values x="10.0" y="30.0" z="30.0" />
</mesh>

<mesh name="box2"
   render="TRUE"
   shape_type="BOX"
   lighting="TRUE"
   texturing="FALSE"
   polygon_mode="SOLID"
   shading_mode="FLAT"
   shadow_caster="FALSE"
   use_vbo="FALSE"
   improve_specular_highlights="TRUE" >
   <attach_material name="m01" />
   <box width="30.0" height="30.0"   depth="30.0" w_segs="5" h_segs="5" d_segs="5" />
   <position x="-10.0" y="0.0" z="0.0" />
   <orientation ang="0.0" x="0.0" y="0.0" z="0.0" />
   <orientation_pitch_yaw_roll pitch="0.0" yaw="0.0" roll="0.0" />

</mesh>


<material name="m01" specular_exp="16.0" opacity="1.0">

</material>


<script name="test" filename="" active="TRUE" run_mode="EXECUTE_EACH_FRAME" run_in_new_thread="FALSE">
   <raw_data>
   <![CDATA[
local new_x, new_y, new_z = HYP_Object.GetDirection( "box1" );
HYP_Object.SetDirection( "box2", new_x, new_y, new_z );

    ]]>
  </raw_data>

</script>


</demoniak3d>

nick_zen

  • Soldier
  • **
  • Posts: 165
Re: SetDirection Bug ??
« Reply #1 on: March 05, 2008, 09:58:49 AM »
Je suis d'accord que c'est zarb.

Pour le Box 1
Si tu mets une val de spin uniquement sur le x, ca a l'air de jouer
Si tu mets une val de spin uniquement sur le y, ca a l'air de jouer

Si tu mets une val de spin sur x et y, ca part déjà en ... Ils sont décalé.

Déjà ca c'est pas logique.


Le pire c'est si tu mets une val de spin uniquement sur le z. Ton
local new_x, new_y, new_z = HYP_Object.GetDirection( "box1" );
HYP_Object.SetDirection( "box2", new_x, new_y, new_z );

Ne suit plus du tout et le box2 ne bouge plus.

T'as raison, serait-ce un bug?

Steph3D

  • Capo Regime
  • ***
  • Posts: 399
Re: SetDirection Bug ??
« Reply #2 on: March 06, 2008, 02:34:47 AM »
Ouais, c'est ça, il y a en fait un axe qui n'est pas pris en compte, comme pour la souris, je me tape tous les bugs  :'( :'( :'(