Gamestudio Links
Zorro Links
Newest Posts
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AndrewAMD, Ayumi, Quad, PeWi), 488 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Ugly Camera attached to Ball Movement Problem #294343
10/18/09 15:31
10/18/09 15:31
Joined: Oct 2008
Posts: 112
N
Ness Offline OP
Member
Ness  Offline OP
Member
N

Joined: Oct 2008
Posts: 112
huhu, I am going into the LITE-C Tutorial and i had the first FAIL in the first Physik Tutorial:

Click to reveal..
function main ()
{


level_load ("testrooma7.wmb");
fps_max = 140;
wait (15); // warte, bis das Level geladen ist
ball = ent_create ("ball.mdl", vector(0, 0, -256), NULL);
ent_create ("tetraeder.mdl", vector(40, 0, -256), NULL); // erstelle den Ball
ph_setgravity (vector(0, 0, -386)); // setze die Schwerkraft
phent_settype (ball, PH_RIGID, PH_SPHERE); // setze den Typus der Physik-Entity
phent_setmass (ball, 3, PH_SPHERE); // und ihre Masse
phent_setfriction (ball, 80); // setze die Reibung
phent_setdamping (ball, 40, 40); // setze die Dämpfung
phent_setelasticity (ball, 50, 20); // setze die Elastizität
while (1)
{
ball_speed.x = 25 * (key_cur - key_cul); // bewege d. Ball mithilfe d. Pfeiltasten
ball_speed.y = 25 * (key_cuu - key_cud); // 25 setzt die x- / y-Bewegungsgeschwindigkeiten
ball_speed.z = 0; // Bewegen auf der vertikalen Achse ist nicht nötig
phent_addtorqueglobal (ball, ball_speed); // füge d. Ball ein Drehmoment hinzu
camera.x = ball.x - 250; // halte d. Kamera 300 Quants hinter d. Ball
camera.y = ball.y; // verwende dasselbe y wie mit d. Ball
camera.z = -200; // und plaziere sie bei z = 1000 Quants
// camera.tilt = -90; // lasse sie nach unten schauen
wait (1);
}


}


Its the BALL Physik Movement and when i press the Key Arrows,the Camera starts to SHAKE very BADLY!
How can I get rid of this problem?
BIG THX to all who can help me laugh

MFG Ness

Re: Ugly Camera attached to Ball Movement Problem [Re: Ness] #294347
10/18/09 15:57
10/18/09 15:57
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
i see nothing that lets the camera shaking....


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: Ugly Camera attached to Ball Movement Problem [Re: alibaba] #294352
10/18/09 16:35
10/18/09 16:35
Joined: Sep 2009
Posts: 496
P
Progger Offline
Senior Member
Progger  Offline
Senior Member
P

Joined: Sep 2009
Posts: 496
fps_max = 140;
well i think that could be ur problem
check out how much fps ur pc has
do it when u load the script19
press F11 and then look left on fps
then change it to the fps u have maybe its the problem but i dont know.Try it and tell if it work laugh


asking is the best Way to get help laugh laugh laugh
Re: Ugly Camera attached to Ball Movement Problem [Re: Progger] #296320
10/30/09 22:11
10/30/09 22:11
Joined: Oct 2008
Posts: 112
N
Ness Offline OP
Member
Ness  Offline OP
Member
N

Joined: Oct 2008
Posts: 112
That has nothing to do with FPS! It has to do with actualization with the camera position and BALL position frown
Oh man...

Re: Ugly Camera attached to Ball Movement Problem [Re: Ness] #296338
10/31/09 00:43
10/31/09 00:43
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
camera.x += (ball.x-250-camera.x)/2*time_step; // halte d. Kamera 300 Quants hinter d. Ball
camera.y += (ball.y-camera.y)/2*time_step; // verwende dasselbe y wie mit d. Ball
camera.z = -200; // und plaziere sie bei z = 1000 Quants


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1