Проблемы с врагами

Не совсем так, как хочется, склеивается расположение врагов на карте. TCastleScene.translate ничего не делает 🙂 Придётся либо писать свою обёртку (чтобы хотя бы перемещать противников без “ручного сканирования”), либо использовать TCastleCreature. Первый подход более оптимальный по ресурсам и удобству – но потребует некоторого (возможно, немалого) времени на разработку. Второй – более быстрый, но может “уткнуться” во что-то “сложнорешаемое”. Попробую на выходных “и так и сяк”.

 

 

Advertisements
Проблемы с врагами

2 thoughts on “Проблемы с врагами

  1. Hi!

    I hope that it’s OK to comment in English. I’m reading your posts through Google Translate, I only understand some parts:)

    As for the Translate method: Indeed, TCastleScene.Translate does nothing. Having this method at the T3D class (and all it’s descendants, like TCastleScene) was misleading, that was my error. Only the descendants T3DTransform or T3DOrient actually implemented the Translate() method to do what it suggests. See the docs: http://castle-engine.sourceforge.net/apidoc/html/Castle3D.T3D.html#Translate

    This is fixed now in engine version on GitHub — the Translate() and Move() methods are only available at the T3DCustomTransform (ancestor of both T3DTransform and T3DOrient).

    So, the simplest solution is to place TCastleScene as a T3DTransform or T3DOrient child, and then add that T3DTransform / T3DOrient instance to the scene manager items. The examples/3d_rendering_processing/scene_manager_demos.lpr shows this — DinoTransform (T3DTransform) is used to move the DinoScene (TCastleScene).

    Yes, using TCreature class would also solve this, since TCreature inherits from T3DOrient.

    In the future engine versions (after 6.0 release) I may just make TCastleScene be a descendant of T3DTransform. This would probably make things easier…

    Liked by 1 person

    1. Thanks a lot for your comment, Michalis!
      It’s absolutely Ok to comment in English 🙂
      I wasn’t yet prepared (didn’t try all I had in mind myself) to ask you about this on Sourceforge 🙂 I was still “working” on wrapping a loaded castle-anim file into a TTransformNode… I believe T3DTransform is exactly the thing I was missing.
      (P.S. it was fun to read how Google translate translated my post into English :))

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s