@sanfelipe007 Sorry mate, not a clue. I am not a Python Programmer, I just found this code on the internet. I recommend asking on blenderartistforum I am sure you will find an answer there
There's a couple of sample blends that you can download to do this based on: # get parent z axis vector parentZ = [parentOrient[0][2], parentOrient[1][2], parentOrient[2][2]] # create parent z axis vector vec2 = Mathutils.Vector(parentZ) # find angle between two angle = Mathutils.AngleBetweenVecs(vec1, vec2)
@rcdboy1 it is different in the newer blender. Instead of LookUpDown in the camera acuators, put UpDown and for the cube actuators, put LeftRight instead of LookLeftRight
@LUMfulmetal DUDE, it does not matter even in this tutorial, you actually could have just named the logic beicks anything and it would have worked, just in the script you'd need to change a few strings.
I have a working mouselook script with only 40 lines, full capping, change sensitivity in game, and it is very smoth mouselook actually, and I made a module for it. I also put in the w a s d controls.
so you just need 4 logic bricks and name three things. This tut is old, but is still works
It all works now, thanks so much! I was having a bit of trouble because I was using the wrong version of blender. I have two versions and one is buggy with python scripts sometimes.
Could you please post a new link for the download of mouselook.py, I don't think the current link is working properly. If you cannot, is it possible to just copy the included text and save it as a python file? If so how?
I have just used the link and it works, but if you are having problems with the link then no worries. You can download the code from the new link in the description
You're using a really old version of my MouseLook script from my website tutorialsforblender3d.
The updated MouseLook script has Invert, capping for up/down movement, and lets you adjust the sensitivity. Also, thanks to to Pelle Johnsen, it now works on the Mac OSX without the mouse look drifting.
What are you doing at 2:54? It looks like you only press some buttons. When i do it with the mouse, the camera get's Crooked. What buttons do i press? Answer please, this is the only problem i have with this! Thanks =P
Thank you, it helped! This now works perfect, well i wonder if there is any possibility to change so the mouse isen't inverted when i look around. when i drag the mouse down it goes up :( Thanks for your help.
I am sorry, for that. You are right, this was done so long ago, i cant remember why i had it on. I hate the mouse click sound to. I need to redo this with out the mouse click.
Nice tutorial, thnx helped a bunch =) good work
MWBLENDER93 3 months ago
dont work, i do whit the video 3 times but doest work (sorry for my english, im spanish)
i do not understand, there are an error in the scrypt?
i use blender 2.49 b
arc575david 6 months ago
@arc575david
The only thing I can think of is you dont have the right version of python?
punkstoper 6 months ago
@punkstoper
i use python 2.7.2
i downloaded last day
who python version use you?
i going to try whit python 3.2.1
arc575david 6 months ago
When I press play it doesn't work and the error is at line 51'' pos = mouseMove()''.
Somethng is wrong with this line!!!
manubudaes 7 months ago
doesnt work!!!!
Roman8880 1 year ago
@Roman8880 there are a few things I cant think of at the top of my head.
1) you may not have the up to date version on Python
2) you are using a different version on Blender
3) you may have made a small mistake during it.
punkstoper 1 year ago
Wow why can't blender just make a way to not need a script for this?
I8DEAN8I 1 year ago
how i put a limit on rotation?
sanfelipe007 1 year ago
@sanfelipe007 Sorry mate, not a clue. I am not a Python Programmer, I just found this code on the internet. I recommend asking on blenderartistforum I am sure you will find an answer there
punkstoper 1 year ago
@punkstoper Okay i will check thank you ^^
sanfelipe007 1 year ago
@sanfelipe007 ,
There's a couple of sample blends that you can download to do this based on: # get parent z axis vector parentZ = [parentOrient[0][2], parentOrient[1][2], parentOrient[2][2]] # create parent z axis vector vec2 = Mathutils.Vector(parentZ) # find angle between two angle = Mathutils.AngleBetweenVecs(vec1, vec2)
sydneydoc 6 months ago
@sydneydoc i will search thank you :D
sanfelipe007 6 months ago
well beter then vegas mans
zac856314 1 year ago
this is gay i am never able to eun my scirpt propely when i add a gamelogic in there it alwasys says that it is a unableb word
TheSkaterman68 1 year ago
Doesn't work :(
fb767 1 year ago
i follow all the instructions and... I cant get it work!! i dont know what im doing wrong XP
OSuKaRuTV 1 year ago
@rcdboy1 it is different in the newer blender. Instead of LookUpDown in the camera acuators, put UpDown and for the cube actuators, put LeftRight instead of LookLeftRight
LUMfulmetal 1 year ago
@LUMfulmetal DUDE, it does not matter even in this tutorial, you actually could have just named the logic beicks anything and it would have worked, just in the script you'd need to change a few strings.
I have a working mouselook script with only 40 lines, full capping, change sensitivity in game, and it is very smoth mouselook actually, and I made a module for it. I also put in the w a s d controls.
so you just need 4 logic bricks and name three things. This tut is old, but is still works
3DWalkers 1 year ago
@rcdboy1 you should select the camera first when u make it parent to the box tahn it works
oxXKeneXxo 1 year ago
It all works now, thanks so much! I was having a bit of trouble because I was using the wrong version of blender. I have two versions and one is buggy with python scripts sometimes.
TheTheSchiznit 1 year ago
Could you please post a new link for the download of mouselook.py, I don't think the current link is working properly. If you cannot, is it possible to just copy the included text and save it as a python file? If so how?
TheTheSchiznit 1 year ago
@TheTheSchiznit
I have just used the link and it works, but if you are having problems with the link then no worries. You can download the code from the new link in the description
punkstoper 1 year ago
@mopdop400
Yep, I was born in
Hackney, London, England
punkstoper 1 year ago
make a revised version of video there is more versions that won't work your way!
freak19930 1 year ago
my camera don't folow my cube ???
rcdboy1 1 year ago
@rcdboy1 the only thing i can think of is, you have not made the Camera a Parent to the Cube
punkstoper 1 year ago
@punkstoper
i made. when i pres P i see the cube
move but my camera don't move
rcdboy1 1 year ago
@rcdboy1 The only things i can think of is
1) You are not in the camera view when you press P
2) You make the Cube a Parent to the camera
3) You may not have connected the Logic bricks properly.
That is all i really can think of, i hope it helps.
punkstoper 1 year ago
CAMWAAAAA
RkaydGamer 1 year ago
why wont my gun follow when i look up or down?
michael55443332211 1 year ago
umm ok well the mouse isnt working a t all for me but everything else such as moving around is any suggestions
lemeuix2 1 year ago
The only thing i can think of is, you don't have python installed on your computer.
punkstoper 1 year ago
@punkstoper ok well i fixed it but now the only thing is that when look up or down my gun wont follow
lemeuix2 1 year ago
your link for the mouselook script down work? anyway you could update this asap please?
xfya 2 years ago
the link is working for me, but just in case i copied and pasted it into the info box
punkstoper 2 years ago
thanks man, i really appreciate it
xfya 2 years ago
how do you not rotate, but move with the mouse?
santagotback101 2 years ago
Go to the text editor. Make a new file. Copy and Paste this code into the file:
from Rasterizer import showMouse
showMouse(1)
Save the text file.
Now give it a name in the pull-down menu (showMouse).
Then, in the logic panel of any empty object (or camera) add only a sensor and a controller.
Set the controller to Python, then put the name of the text file (showMouse) in the field.
I hope that helps
punkstoper 2 years ago
you play combat arm cool lol
LALAPAPA1 2 years ago
yep
punkstoper 2 years ago
I am sorry, I did not see anything on the website to say that i need to ask.
punkstoper 2 years ago
hi punkstoper,
You're using a really old version of my MouseLook script from my website tutorialsforblender3d.
The updated MouseLook script has Invert, capping for up/down movement, and lets you adjust the sensitivity. Also, thanks to to Pelle Johnsen, it now works on the Mac OSX without the mouse look drifting.
Clark
cthames11 2 years ago
thanks for the news. I will make an update vidoe ASAP
punkstoper 2 years ago
Have you got Python on your P.C
punkstoper 2 years ago
why is it when i look up it goes down
jmaster34 2 years ago
Because the script it reverted. I think that is what you call it. But i am working hard trying to make it so it is not reverted.
punkstoper 2 years ago
yeah i found the part so i deleted it it works fine now
jmaster34 2 years ago
So you, got the mouse to work normal?
punkstoper 2 years ago
yes i did ill give you the code if you want it
jmaster34 2 years ago
sure
punkstoper 2 years ago
What are you doing at 2:54? It looks like you only press some buttons. When i do it with the mouse, the camera get's Crooked. What buttons do i press? Answer please, this is the only problem i have with this! Thanks =P
RobloxTeam 2 years ago
If you want to get the cam in place. what you do is press the middle line, and then with the mouse push down, type 90.
I hope that helps.
punkstoper 2 years ago
Thank you, it helped! This now works perfect, well i wonder if there is any possibility to change so the mouse isen't inverted when i look around. when i drag the mouse down it goes up :( Thanks for your help.
RobloxTeam 2 years ago
I am working out the same think. However i don't know programing python. So i am playing about with the script.
punkstoper 2 years ago
Thanks for the tutorial.:) I have a question thought. Do you know how to make the character rotate with the mouse, Like in Reverb or Stick Arena?
HeroOfTime121 2 years ago
not yet, no. I am still trying to understand the code.
punkstoper 2 years ago
Thank you SOOO much!!! I have been searching for this ALL over the internet!
It works!! (If you do EVERYTHING exactly right). Thanks a lot!!
Now, to figure out how to limit how far you look (so you don't make a full 360 in any direction)
Littledude514 2 years ago
I am glad i can help. I am going thought the script to see if i can change it. So it don't move 360 turns. but so far no, luck.
punkstoper 2 years ago
Your voice is awesome ;D
TheViewer44 2 years ago
thanks
punkstoper 2 years ago
it is working :) thanks
darthmaul77777 2 years ago
just so everyone knows does not work on blender 2.49
lamers01 2 years ago
??? i thought it will work as long as you have Python 2.5.2 on your P.C and blender knows it is there.
punkstoper 2 years ago
yes it does work on Blender 2.49 just tried it and works perfectly!
mattydavid12 2 years ago
The mouse click is kind of annoying.
owchywawa 2 years ago
I am sorry, for that. You are right, this was done so long ago, i cant remember why i had it on. I hate the mouse click sound to. I need to redo this with out the mouse click.
punkstoper 2 years ago
Good video otherwise though ;)
owchywawa 2 years ago