Jump to content

question about follow camera -> ped


iiv03

Recommended Posts

hey i would like to make camera . on other position and i'm use setCameraMatrix and i created that ped start movements. but i want make cam follow ped when his move . what should i use on functions?

--if this ->> setCameraTarget + attachElements? and how will be?

 

Link to comment
4 hours ago, Furzy said:

Look this thread 

 

 

4 hours ago, IIYAMA said:

You could attach the camera to the ped, see example in this link:

https://wiki.multitheftauto.com/wiki/GetCamera

The example explains how to attach the camera to a vehicle, without the need of updating the camera with onClient(Pre)Render.

ty guys I was needed a part of camera that followed ("Element") and found the solution

addEventHandler("onClientRender", root, function()
	local ox,oy,oz = getElementPosition(army1)
	setCameraMatrix(ox,oy,oz,ox,oy,oz)
end)

 

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...