having a plane facing the camera

Blitz3D Forums/Blitz3D Beginners Area/having a plane facing the camera

Osoko(Posted 2006) [#1]
Hi there, hi a bit confuse with math.
I'd like to have a verticel plane facing the camera, so that only Y angle is concerned ( PointEntity oriente yaw and pitch )
So i'd like to have a value for Y relative to camera position from the plane.
Thank's


jfk EO-11110(Posted 2006) [#2]
I guess you are talking about the blitz3d CreatePlane plane? I rarely use it. If I recall correctly, you can turn it. So do something like this:

plane =createplane()
turnentity plane,90,0,0

camera=createcamera()
translateentity camera,0,0,-10

entityparent plane, camera

Parenting the plane to the camera willmake it move with the camera. You could also try to use Pointentity in the mainloop:

pointentity plane ,camera
rotateentity plane, entitypitch(plane),entityyaw(plane),0

Although this may work with all kinds of meshes, I'm not sure if a plane that is kind of a special object will response exactly the same way.


Osoko(Posted 2006) [#3]
Well, the plane is made in 3d app, it's a 2d character with alpha.
I don't want it to move with the camera and pointentity oriente yaw and pitch.
I just want the plane to turn on it's Y axe, in a way it can always face the camera.
It's a relation between Y angle of the plane and the camera pos.
The plane is statis ( only rotate in Y)


StarTiger0(Posted 2006) [#4]
Hi

What about a sprite

loadsprite
spriteviewmode

Chris


Mustang(Posted 2006) [#5]
Sprites:

http://www.blitzbasic.com/b3ddocs/command.php?name=SpriteViewMode&ref=3d_cat


Sir Gak(Posted 2006) [#6]
I agree. Sprites can be set to ALWAYS face the camera. Voila!