how to make it relative to the camera?

Blitz3D Forums/Blitz3D Programming/how to make it relative to the camera?

Akat(Posted 2004) [#1]
anyone know how to move the character on the terrain wich relative to the camera...

* i mean how to move the character when i hold UP KEY an then the character will move up (the screen) depend on the camera view... ex: LOTR - return of the King (PC)


jfk EO-11110(Posted 2004) [#2]
Maybe something like this: use entityroll of the camera:

if key
x=x+sin(roll+key*90)
y=y+cos(roll+key*90)
endif

...just an idea


Jeppe Nielsen(Posted 2004) [#3]
maybe use TFormVector?

speed#=1

;for up:
TFormVector 0,0,speed#,camera,0

TranslateEntity player,Tformedx(),Tformedy(),Tformedz()




Ross C(Posted 2004) [#4]
How about just rotating the character to the same z-rotation as the camera.


(tu) sinu(Posted 2004) [#5]
you mean like in mario, zelda and every other 3d platformer too, using tformvector is the way, i wrote loads of functions to do different methods of turning and pointing but tformvector is always the easiest and simplest to understand.


Akat(Posted 2004) [#6]
looks TFormVector is really the answer... can put some demo how efficiently use this please? like moving a box on a plane or something...