Maussteuerung
Übersicht

![]() |
Boris0190Betreff: Maussteuerung |
![]() Antworten mit Zitat ![]() |
---|---|---|
Hi, ich hab ein Problem, das elativ einfach zu lösen sein dürfte, denke ich!
Ich will einfach nur die Camera mit der Maus bewegen, so wie in einem Egoshooter halt üblich. ich hab das so gelöst: Code: [AUSKLAPPEN] RotateEntity cam,EntityPitch(cam)+MouseYSpeed(),EntityYaw(cam)-MouseXSpeed(),0
nun ist es aber so, das die Cam mit genügend mausschwung über die 90° Grenze nach üben "drüberhüpft", d.h. es ist so, als hätte sie sich um 180° einfach gedreht! Vielleicht kann mir jemand helfen, thx! ![]() |
||
If windows is the sollution, I want my problems back! -
The only way to have a friend is to be one |
INpac |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
hi. wenn du ein etwas besseres system dafür haben willst, benutze einen pivot, an dem eine kamera hängt - der pivot kann nur an Y-Achse gedreht werden, kamera wird immer um MouseYspeed an X-Achse gedreht, und bei der Y-Achse auf Yaw des Pivots.
camheight ist die höhe der kamera über dem pivot, pivx etc sind die koordinaten des pivots Code: [AUSKLAPPEN] piv = createpivot() cam = createmcamera() ... pitch = entitypitch(cam) yaw = entitytyaw(piv) pitch = pitch - mouseyspeed() yaw = yaw + mousexspeed() if pitch < -80 then pitch = -80 if pitch > 80 then pitch = 80 rotateentity piv,0,yaw,0 rotateentity cam, pitch, yaw,0 positionentity cam, pivx, pivy+camheight, pivz |
||
![]() |
Kryan |
![]() Antworten mit Zitat ![]() |
---|---|---|
Code: [AUSKLAPPEN] RotateEntity cam,EntityPitch(cam)+MouseYSpeed()/4,EntityYaw(cam)-MouseXSpeed()/4,0 |
||
![]() |
Boris0190 |
![]() Antworten mit Zitat ![]() |
---|---|---|
yop, bis auf ein paar Fehler, (plus statt Minus) hats gepasst, danke, auf die Idee bin ich ned selber gekommen ![]() |
||
If windows is the sollution, I want my problems back! -
The only way to have a friend is to be one |
![]() |
Boris0190 |
![]() Antworten mit Zitat ![]() |
---|---|---|
also des mit dem pivot geht, des zweite ned, is irgendwie blödsinn... | ||
If windows is the sollution, I want my problems back! -
The only way to have a friend is to be one |
![]() |
Kryan |
![]() Antworten mit Zitat ![]() |
---|---|---|
sorry,
ich hab nicht ganz gelesen, was nun das prblem ist, ich dachte, dass es viel zu schnell sei, wie es sich dreht!!! |
||
![]() |
Boris0190 |
![]() Antworten mit Zitat ![]() |
---|---|---|
yo klar, np ![]() ![]() |
||
If windows is the sollution, I want my problems back! -
The only way to have a friend is to be one |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group