Jump to content

setCameraTarget on a chair


Recommended Posts

Hello ,

Im trying to make my view look at a chair.

What i've tried ;

  
chair = createObject(1671,0,0,0) 
  
function changemyview(thePlayer) 
setCameraTarget(thePlayer,chair) 
end 
  

So i wanna know how im able to get an camera attached on the chair (the chair is moveable so it should update if its moving)

Link to comment
Hello ,

Im trying to make my view look at a chair.

What i've tried ;

  
chair = createObject(1671,0,0,0) 
  
function changemyview(thePlayer) 
setCameraTarget(thePlayer,chair) 
end 
  

So i wanna know how im able to get an camera attached on the chair (the chair is moveable so it should update if its moving)

  
local cam = getCameraTarget() 
attachElements( cam, chair ) 
  

Link to comment
Hello ,

Im trying to make my view look at a chair.

What i've tried ;

  
chair = createObject(1671,0,0,0) 
  
function changemyview(thePlayer) 
setCameraTarget(thePlayer,chair) 
end 
  

So i wanna know how im able to get an camera attached on the chair (the chair is moveable so it should update if its moving)

  
local cam = getCameraTarget() 
attachElements( cam, chair ) 
  

Hello ,

Its not working first i had error from local cam = getCameraTarget() , it needed an argument so i wrote "getCameraTarget(thePlayer) but then it does nothing.

Link to comment
  
chair = createObject(1671,0,0,0) 
  
function changemyview(thePlayer) 
local cam = getCameraTarget() 
attachElements( cam, chair,0,0,10 ) 
end 
  

local chair = createObject(1671,0,0,0) 
local cam = getCamera() 
  
function changemyview() 
attachElements( cam, chair, 0, 0, 10 ) 
end 
  

But look if it is moving and change the position arguments of attachElements,

and if not working work this on

smoothMoveCamera 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...