PointEntity

Blitz3D Forums/Blitz3D Beginners Area/PointEntity

ghost(Posted 2005) [#1]
Hello,
I have some problem setting up my camera, and I would like to know something about the PointEntity command :
If I have a very large character model and just a little camera just behind it, where does point the camera with the PointEntity command ?? At the feet ? The stomach ? The head ? Does it has something to do with the 3D center point (origin) of the model when we modelize it ?
Thanks in advance.


stayne(Posted 2005) [#2]
yep, the 3d center point. if you're in a position where you can't change the center point, just create a pivot, make it a child of the model, move the pivot wherever and point to that instead.


ghost(Posted 2005) [#3]
Thanks for your quick answer.


octothorpe(Posted 2005) [#4]
Cameras are points, they cannot be little because they have no size.


Zethrax(Posted 2005) [#5]
Actually they do have size (sort of). If you scale them the near and far clipping ranges will alter.

But I'm just splitting hairs :)


IKG(Posted 2005) [#6]
I can't get this function to work. All I've been trying to do is point a mesh towards something else, as a test. I've tried using a camera and a pivot with the mesh, but no luck.


stayne(Posted 2005) [#7]
post your code?


IKG(Posted 2006) [#8]
I don't think I have it anymore. Can someone give me an example as to how I could turn something as simple as a mesh, towards a pivot? That would be great :)


jfk EO-11110(Posted 2006) [#9]
maybe something like this:

camera=createcamera()

char=loadmesh("hero.3ds")
head=createpivot(char)
translateentity head,0,meshheight(char)/2.0,0

and then in the main loop:

pointentity camera,head

Or maybe you need to use

pointentity camera,head,0

to prevent the camera from rolling over.


Ross C(Posted 2006) [#10]
You'd best using a sphere, instead of a pivot, to verify it's actually pointing at it :o)