Slastraf Posted May 16, 2015 Share Posted May 16, 2015 So i was starting a new project and modeled an Player with some bones. It is in a third person view and the problem is that you cant see where the player looks (to pick up objects). So I just started to Insert the camrotation on the x axis inro a SetRotation function. 1. function Script:UpdateWorld() 2. self.entity:SetRotation(Math:self.camRotation.x,0,0) 3. 4. end I get the error: function arguments exspected near "." , (in the 2. line) The herarchy looks sth like this : Player(fpsPlayer) SantaModel ->arms ... -> Head (right here is the Script attached) Camera(this has no script but is attached to Player) I dont know wheres the problem , it is probably some newbie mistake. To make sure, the camRotation.x is in an other script. Quote Link to comment Share on other sites More sharing options...
macklebee Posted May 16, 2015 Share Posted May 16, 2015 What is 'Math:self.camRotation.x'? I suspect you just meant to use 'self.camRotation.x'. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Slastraf Posted May 17, 2015 Author Share Posted May 17, 2015 What is 'Math:self.camRotation.x'? I suspect you just meant to use 'self.camRotation.x'. when I use camRotation.x it says attempt to index nil value Quote Link to comment Share on other sites More sharing options...
macklebee Posted May 17, 2015 Share Posted May 17, 2015 Well you also haven't defined 'self.camRotation' in the above script with what I assume would be a Vec3. So currently the variable is nil and you cannot determine the ".x" until it is defined. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Slastraf Posted May 17, 2015 Author Share Posted May 17, 2015 Well you also haven't defined 'self.camRotation' in the above script with what I assume would be a Vec3. So currently the variable is nil and you cannot determine the ".x" until it is defined. The problem is that camrot...x is in an other script , I already asked Einlander personally. We wanted to make it via the flowgraph editor, he says he is going to make this for himself and then give it to me after much attempts. I will document it here when it is working Quote Link to comment Share on other sites More sharing options...
macklebee Posted May 17, 2015 Share Posted May 17, 2015 Exactly the problem I stated above - the variable 'self.camRotation' is not defined in that script. Edit- Also i see you are using the inherent fpsplayer and I assume its script. If that is the case, then there is no need for 'Camera 2' as the fpsplayer script creates a camera via code. Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Recommended Posts
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.