2011-07-01から1ヶ月間の記事一覧

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) Enter current password for root (enter for none):

Enter current password for root (enter for none): Enter

Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist

Type. mysql_install_db It maybe solve the problem.

disco light ディスコライト

ライトにcookieを付加 http://unity3d.com/support/documentation/Components/class-Light.html ディスコのライトに使えそう! 追記: Build SettingsのPlatformがAndroidなどの携帯端末だと ライト機能が弱くなり、ライトのCookieは使えない。 「なんでCooki…

grass texture bump mapping

草のような柔らかいものにbump mappingしても、簡単にはうまくいかないようです。 (gimp normalmap pluginでnormap map画像を生成)

コンソール・ゲーム C言語 getch kbhit linux

http://www.plustarnet.com/aspil/Programming/console01.htm windows用のプログラムをcygwinで動かしてみた。表示が崩れた.. conio.hがなくてgetch, kbhitが使えなかったので getch linuxなどで検索して使えるようにして動かした。#include <stdio.h> #include <termios.h> #inc</termios.h></stdio.h>…

階乗 有理数 判定 関数 CPP C++ C言語

cpp

from google test sample #ifndef GTEST_SAMPLES_SAMPLE1_H_ #define GTEST_SAMPLES_SAMPLE1_H_ // Returns n! (the factorial of n). For negative n, n! is defined to be 1. int Factorial(int n); // Returns true iff n is a prime number. bool IsPrim…

pukiwiki install 導入

前提:サーバーでPHPが動いているwinscpでUPする. アクセスすると RuntimeError - Error message : Directory is not found or not writable (DATA_DIR) などと言われるのでwinscpから書き込み権限を変更する 下を参考に、書くフォルダの権限を変更する。 77…

アイコンなど作れるようになりたいな

add modifier mirror ミラー 解除

edit modeでadd modifier > mirrorして object modeでmodifier > applyしたらそこでミラーは切れる。 途中までミラーで作って、最後に左右で変化をつけたい時や ボーンを入れるときなどにapplyすればよい。

シーン 切り替え 状態 保存 

sceneをまたいで状態保存→DontDestroyOnLoad()

sculpt スカルプト、リトポロジー、バンプマッピングした剣

blenderで作り、unityで動作確認。 ローポリの剣を作って複製した後、 片方をハイポリにしてスカルプトした。

カメラの位置を編集画面の視点へ移動

runicalp Ctrl + Alt + Numpad 0で 現在の視点にカメラを移動できますがそういうことですか RT @peroon: 【Blenderの質問】編集画面からの視点で レンダリングって、できないでしょうか? #Blender

アニメーション 武器を持たせる

Unity側で「手のSphere」の子に「武器」をセットすればよいと思っていたが 武器が動かなかった。 アニメーション中、Sphereの座標は動いていないようだった。 Boneの座標は動いていたので、Boneの子に武器をセットしたら武器が追従した。 しかし画像のような…

カラーバランスの調整は RGBレイヤーにのみ有効

GIMPで脱色しようとしたら上記のようなエラー。 画像>モード>RGBにすればOK.

ragdoll ラグドール

骨付きのモデルが必要→フリーであります http://u3d.as/content/mixamo/zombie-character-pack/1sK http://d.hatena.ne.jp/gumilab/20110426/1303798974

make a block wall with code コードで多数のブロックから成る壁を生成

function Start () { for (var y = 0; y < 5; y++) { for (var x = 0; x < 5; x++) { var cube = GameObject.CreatePrimitive(PrimitiveType.Cube); cube.AddComponent(Rigidbody); cube.transform.position = Vector3 (x, y, 0); } } } //add it to GameObj…

mouse touch object マウスでオブジェクトに触れたことを検知

function OnMouseEnter () { renderer.material.color = Color.red; } //attach this script to cube or so.

子供を全部移動

// Moves all transform children 10 units upwards! for (var child : Transform in transform) { child.Translate(0, 10, 0); } //他オブジェクトとのやり取り //http://unity3d.com/support/documentation/ScriptReference/index.Accessing_Other_Game_Ob…

タグ追加

Tagsを展開してElementに書く。

occlusion culling static オクルージョンカリング

ビルなど、動かないものはStaticにチェックしておくと オクルージョンカリングによりパフォーマンスが上がるhttp://unity3d.com/support/documentation/Components/class-GameObject.html

オブジェクト同士のやり取り

GetComponent / SendMessage

animation layer アニメーション レイヤー化

//数字が大きい方が動いているときは、そちらが優先して再生される。 function Start () { animation[“idle”].layer = -2; animation["attack01"].layer = 1; }

他のオブジェクト / 別のスクリプト の関数を呼ぶ / 関数呼び出し : GameObject.SendMessage

http://unity3d.com/support/documentation/ScriptReference/GameObject.SendMessage.html // Calls the function ApplyDamage with a value of 5 gameObject.SendMessage ("ApplyDamage", 5.0); // Every script attached to the game object // that has a…

ゲームブログ

良い順 GAME LIFE http://www.game-damashi.com/ .. ..

Island Survival

ステージの選択方法 = プレイヤーが落ちる

unitypackage export 出力

アセット(プレハブやシーン)を右クリック>export package マテリアルでテクスチャを貼ったのなども反映されるので Unityコミュニティの人たちで共有するには良い形式

SS screen capture スクリーンショット

Application.CaptureScreenshot()

オブジェクトをマウスでクリック

Camera.main.ScreenPointToRay(Input.mousePosition);

scene シーン 順番 最初のシーン

file > build settings リスト内にプロジェクトタブからシーンファイルをドラッグアンドドロップ

mysql install serversman serverman wordpress install

概要:serversman@vps にwordpress 3.2 を導入する方法です。 yum install 'php*' yum install mysql-server //http://d.hatena.ne.jp/deeeki/20100606/serversman_apache_setting //mysqlのDBを作る必要があるらしい.. service mysqld start mysql //mysql…