Jump to content
Sign in to follow this  
Alert23

object face player in 3D direction

Recommended Posts

hey,

i want to create a mission with a unique camera view, so i have multiple objects (Sign_Sphere10cm_F) named and placed in editor for every area acting as a camera,

what i do is switch the camera to that object and use an onEachFrame command to focus on the player, now i got this code which will focus on the player but not in 3D

i really need help with this, cant solve it since days..

cam1 switchCamera "Internal";

onEachFrame {
cam1 setdir (cam1 getdir player);
};

example video

 

  • Like 1

Share this post


Link to post
Share on other sites

i finally figured it out 🤣

 

cam1 switchCamera "internal"; 
onEachFrame {

cam1 setVectorDirAndUp [  
	(eyepos cam1) vectorFromTo (aimpos player),   
	[0,0,1]  
	]; 
};  

 

  • Like 4

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×