HSPポータル
サイトマップ お問い合わせ


HSPTV!掲示板


未解決 解決 停止 削除要請

2010
0325
AOISENSIEASY3D の視点変更について1未解決


AOISENSI

リンク

2010/3/25(Thu) 17:07:59|NO.31562


#include "e3dhsp3.as" #module #deffunc waitbyfps int p1, var fps E3DWaitbyFPS@ p1, fps await 0 return #global dim arfps, 50 dim keybuf, 256 ;file のpath 用のバッファーの作成 pathlen = 2048 sdim mediadir, pathlen mediadir = dir_cur + "\\Media" sdim pathbuf, pathlen, 2 screenw = 1024 : screenh = 768 screen 0, screenw, screenh, 1 title "Easy3D for HSP3 sample" ;初期化 E3DEnableDbgFile E3DInit 0, -1, 0, 16, 0, scid1 ;カメラの初期化 camposx = 0.0 : camposy = 400.0 : camposz = -2000.0 E3DSetCameraPos camposx, camposy, camposz camdegxz = 180.0 : camdegy = 0.0 E3DSetCameraDeg camdegxz, camdegy ;projectionの変更をしたいときは、以下の2行を有効にしてください。 proj_near = 100.0 : proj_far = 30000.0 : proj_fov = 60.0 E3DSetProjection proj_near, proj_far, proj_fov //猫データ読み込み pathbuf.0 = mediadir + "\\hito.sig" E3DSigLoad pathbuf.0, hsid1 , 2 , 0.5 E3DSetPos hsid1, 0.0, 0.0, 0.0 //モーションの読み込み pathbuf.0 = mediadir + "\\停止.qua" E3DAddMotion hsid1, pathbuf.0, motid1, framemax1 E3DSetMotionKind hsid1, motid1 //ライトの作成 lightdirx1 = 0.0 lightdiry1 = 0.0 lightdirz1 = 1.0 lightr1 = 255 lightg1 = 255 lightb1 = 255 E3DCreateLight lid1 E3DSetDirectionalLight lid1, lightdirx1, lightdiry1, lightdirz1, lightr1, lightg1, lightb1 chkfps1 = 0 *main ; keybuf変数は、メインループの外で、dim keybuf, 256 として、確保しておいてください。 E3DGetKeyboardState keybuf if keybuf.VK_ESCAPE = 1 : E3DBye : End ; [ESC]で終了 E3DSetNewPose hsid1, frameno1 E3DBeginScene scid1 E3DChkInView scid1, hsid1 ;不透明部分の描画をする E3DRender scid1, hsid1, 0, frameno1, 0 ;半透明部分の描画をする E3DRender scid1, hsid1, 1, frameno1, 0, 0, 0, 1 gosub *DrawText E3DEndScene E3DPresent scid1 waitbyfps 60, chkfps1 arno = 0 repeat 49 befno = 48 - arno aftno = 49 - arno arfps.aftno = arfps.befno arno++ loop arfps.0 = chkfps1 goto *main *DrawText textr = 255 : textg = 255 : textb = 255 textscale = 1 lcnt = 0 avfps = 0 repeat 50 avfps += arfps.lcnt lcnt++ loop avfps = avfps / 50 textposx = 10 : textposy = 80 strchk3 = "avfps " + avfps E3DDrawText textposx, textposy, textscale, textr, textg, textb, strchk3 textposx = 10 : textposy = 140 strchk3 = "chkfps1 " + chkfps1 E3DDrawText textposx, textposy, textscale, textr, textg, textb, strchk3 return

このプログラムに、十字キーでカメラの移動 (e3dhsp3_toolscamera.hspのような)
を追加したいのですが、どのようにすればいいのかわかりません。
ご教授お願いします。 



この記事に返信する


backdrop

リンク

2010/3/31(Wed) 16:15:22|NO.31701

HGIMG3と同じようにstickで入力待ちしてそれに応じてカメラ操作すればどうですか?



ONION software Copyright 1997-2023(c) All rights reserved.