GOODVEEN | Дата: Суббота, 30 Августа 2008, 08:32 | Сообщение # 1 |
Бывалый
Группа: Участники
Сообщений: 67
Награды: 0
Замечания: 0%
Статус:
Профессия: Немного прогаю немного Моделю)
| пишу от nuclear'а у него трабл с инетом пока что: Code 'Strict Import rubux.xors3d Import "PhysX_func.bmx"
width = 1024 Height = 768
xGraphics3D width, Height, 32, 1,1 pxCreateWorld(1, "key") pxSetGravity(0, -20, 0)
mousespeed:Float =.5 camerasmoothness:Float = 4.5
ter = xCreateCube() xScaleEntity ter, 1000, 1, 1000
Global eye = xCreateCamera() xCameraClsColor eye, 20, 90, 190 xCameraRange(eye, 0.9, 16000) xPositionEntity eye,0,90,0 xRotateEntity eye, 20,0,0
Global light = xCreateLight(1) xRotateEntity light, -60,0,20 xPositionEntity light,30,270,-730 player_dynamic = pxBodyCreateCapsule(20, 2, 10) pxBodySetFlagGravity(player_dynamic,0) pxMaskSet(player_dynamic, 3) pxBodySetLinearDamping(player_dynamic, 10) pxBodySetFrozenRot(player_dynamic, 1) pxBodySetPosition(player_dynamic, 0, 30, 0)
Repeat
pxRenderPhysic(30, 0) pxBodySetRotation(player_dynamic, 0, xEntityYaw (eye), 0) xPositionEntity eye, pxBodyGetPositionX(player_dynamic), pxBodyGetPositionY(player_dynamic) + 10, pxBodyGetPositionZ(player_dynamic) pxBodySetLocalLinearSpeed (player_dynamic, x, - 10, z) x=0 z=0
'camera rotations mxs:Float = CurveValue(xMouseXSpeed() * mousespeed, mxs, camerasmoothness) mys:Float = CurveValue(xMouseYSpeed() * mousespeed, mys, camerasmoothness) camxa:Float = camxa - mxs Mod 360 camya:Float = camya + mys If camya<-89 Then camya=-89 If camya > 89 Then camya = 89 xMoveMouse width *.5, Height / 2 xRotateEntity eye, camya, camxa, 0
xRenderWorld() xUpdateWorld() xText 10, 30, "FPS " + xGetFPS() xFlip Until xKeyHit(1) Or xWinMessage("WM_CLOSE") Function CurveValue:Float(newvalue:Float, oldvalue:Float, increments) If increments > 1 Then oldvalue:Float = oldvalue:Float - (oldvalue:Float - newvalue:Float) / increments If increments<=1 Then oldvalue=newvalue Return oldvalue:Float End Function Используется BMax+Xors3D+PhysX,но почему то не поварачиваеться камера... мож что тут не то?! помогите пожалсто)
Чем бы дитя не тешилось, лишь бы ноги в рот не клало)))
|
|
| |