Jump to content

Recommended Posts

Posted

I am trying to write a Camera Controller script (Yes I know there's a premade one), I have gotten the movement down, and logically I should move on with turning, so I am trying to program my script to move according to the Camera Angle, I tried writing self.Camera:GetRotation(), which returned a nil value resulting in error, then found out I had to write a Boolean to go with it, upon trying self.Camera:GetRotation(true), the same error occurred, here's my current script, and a log of my error:  9 : attempt to index field 'Camera' (a nil value)

Skjermbilde 2024-05-30 061627.png

  • 1 month later...
Posted

I think it is incomplete your code to make a running smooth, you need to see the code with a premade as "CameraControls.lua" and then compare with your code on what it is wrong ...

You need mouse as well and a setup of camera to view from world

Hope that it helps you.

Good luck.

 

  • 1 month later...
Posted
On 7/16/2024 at 7:02 AM, khotan said:

I think it is incomplete your code to make a running smooth, you need to see the code with a premade as "CameraControls.lua" and then compare with your code on what it is wrong ...

You need mouse as well and a setup of camera to view from world

Hope that it helps you.

Good luck.

Where can I find CameraControls.lua?

Posted

It will be in Source/Components/Player, in a new Lua project.

We are also currently working on a first-person shooter template, to be released in five weeks.

GWpJNsDbMAALRcp?format=jpg&name=large

Let's build cool stuff and have fun. :)

Posted
8 minutes ago, Josh said:

It will be in Source/Components/Player, in a new Lua project.

We are also currently working on a first-person shooter template, to be released in five weeks.

GWpJNsDbMAALRcp?format=jpg&name=large

Oh ****, I use leadwerks not ultra

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...