Welcome Guest [Log In] [Register]
We hope you enjoy your visit.


You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

Join our community!

If you are already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Rotation weirdness; some dynamics weirdness
Topic Started: Oct 13 2008, 08:52 PM (500 Views)
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
I have a question. Why does this code make something move: rotyadd=roty*2
roty=3200+rotyadd


While this code doesn't?
rotyadd=roty/2
roty=3200+rotyadd
Edited by Eansis, Oct 14 2008, 12:07 AM.
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
Bazza
Member Avatar
Forum God
[ *  *  *  *  *  * ]
doent roty start out at 0?
cant divide 0 by 2
My instinct is to hide in this barrel, like the wily fish.
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
bazza games
Oct 13 2008, 11:56 PM
doent roty start out at 0?
cant divide 0 by 2
Did you actually LOOK at my code??
Edited by Eansis, Oct 14 2008, 12:05 AM.
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
ashrat3000
Member Avatar
u3d raytracer
[ *  *  *  *  *  * ]
bazza games
Oct 13 2008, 11:56 PM
doent roty start out at 0?
cant divide 0 by 2
Actually you can. I'm in a very high level math (calculus 5) and using special techniques you can indeed do 0/5.
The answer is ln(6x2-5x3/4) - ln(36x4-25x3/8).

And yes that really is the answer. Do the math.
I'm not joking


그대를 사랑해


Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
ashrat3000
Oct 14 2008, 12:05 AM
bazza games
Oct 13 2008, 11:56 PM
doent roty start out at 0?
cant divide 0 by 2
Actually you can. I'm in a very high level math (calculus 5) and using special techniques you can indeed do 0/5.
The answer is ln(6x2-5x3/4) - ln(36x4-25x3/8).

And yes that really is the answer. Do the math.
I'm not joking


Im guessing you used imaginary numbers but can you give me insight onto why

Code:
 
rotyadd=roty/1.2
roty=3200+rotyadd


isn't dynamic, but
Code:
 

rotyadd=roty*1.2
roty=3200+rotyadd


is?
Edited by Eansis, Oct 14 2008, 12:10 AM.
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
Eanbro
Oct 14 2008, 12:09 AM
ashrat3000
Oct 14 2008, 12:05 AM
bazza games
Oct 13 2008, 11:56 PM
doent roty start out at 0?
cant divide 0 by 2
Actually you can. I'm in a very high level math (calculus 5) and using special techniques you can indeed do 0/5.
The answer is ln(6x2-5x3/4) - ln(36x4-25x3/8).

And yes that really is the answer. Do the math.
I'm not joking


Im guessing you used imaginary numbers but can you give me insight onto why

Code:
 
rotyadd=roty/1.2
roty=3200+rotyadd


isn't dynamic, but
Code:
 

rotyadd=roty*1.2
roty=3200+rotyadd


is?
Please test this out and see for yourself. Just place the code into a wall object and you will understand what this topic is about.
Edited by Eansis, Oct 14 2008, 12:13 AM.
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
ashrat3000
Member Avatar
u3d raytracer
[ *  *  *  *  *  * ]
Crap, my math was wrong.
The actually answer is
ln(6x2-5x3/4) - (1/5)ln(36x4-25x3/8).

As for your thingy, hold on let me test it.

EDIT:
I have no clue. It seems like it is dynamic, but the roty is topping out at about 20000.

Edited by ashrat3000, Oct 14 2008, 12:44 AM.
그대를 사랑해


Offline Profile Quote Post Goto Top
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
Zero divided by n equals zero.
n divided by something APPROACHING zero approaches infinity, not equal.

And stop being an ass ashrat. Everybody knows that your fancy expression equals zero.

@Eanbro.
I graphed it, I have no idea what the hell you guys are talking about, so yeah. I mean....
\

Okay, let me get this algebraically, so nobody post. I'm editing.

Edit:
rotyadd=roty*2
roty=3200+rotyadd

Now, what you are doing is constantly moving. You are approaching infinity, or if you're still in precal and don't know what infinity is, an undefined amount.

rotyadd=roty/2
roty=3200+rotyadd

Here, you actually ARE moving. Make the code execute every other step.
In numbers, you are approaching A DEFINITE amount.
Example:
3200
4800
5600
6000
6200

Notice how the increment is growing smaller. It approaches 6400, but doesn't quite reach it.
Heh, good 'ol Algebra 2.
Edited by skarik, Oct 14 2008, 12:46 AM.
Blog|EHS
Offline Profile Quote Post Goto Top
 
Gandalf20000
Member Avatar
Geek
[ *  *  *  *  *  * ]
Actually, you are all wrong. 0/<blah blah blah> is zero, because they can't go into zero. It is <blah blah blah>/0 that returns errors, because zero holds no value, therefore we don't know how many times it can go in, so it is undefined.

EDIT: Dang it! Skarik beat me to it.
Edited by Gandalf20000, Oct 14 2008, 12:40 AM.
Offline Profile Quote Post Goto Top
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
I double beat you.
Blog|EHS
Offline Profile Quote Post Goto Top
 
ashrat3000
Member Avatar
u3d raytracer
[ *  *  *  *  *  * ]
Quote:
 
And stop being an ass ashrat.
Gee, thanks. I feel great now.
My self esteem is booming.

EDIT:
@skarik hmm not bad. I knew it was topping out but I didn't know why.

Edited by ashrat3000, Oct 14 2008, 12:48 AM.
그대를 사랑해


Offline Profile Quote Post Goto Top
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
Lol, sorry, I've been doing that all day.
Blog|EHS
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
skarik
Oct 14 2008, 12:39 AM
Zero divided by n equals zero.
n divided by something APPROACHING zero approaches infinity, not equal.

And stop being an ass ashrat. Everybody knows that your fancy expression equals zero.

@Eanbro.
I graphed it, I have no idea what the hell you guys are talking about, so yeah. I mean....
\

Okay, let me get this algebraically, so nobody post. I'm editing.

Edit:
rotyadd=roty*2
roty=3200+rotyadd

Now, what you are doing is constantly moving. You are approaching infinity, or if you're still in precal and don't know what infinity is, an undefined amount.

rotyadd=roty/2
roty=3200+rotyadd

Here, you actually ARE moving. Make the code execute every other step.
In numbers, you are approaching A DEFINITE amount.
Example:
3200
4800
5600
6000
6200

Notice how the increment is growing smaller. It approaches 6400, but doesn't quite reach it.
Heh, good 'ol Algebra 2.
Yeah, I know that, but What doesn't make sense is that the Roty Does Not Change per step (AT ALL) when I do a division.

I implore you to place this code in the wall object.
Edited by Eansis, Oct 14 2008, 12:56 AM.
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
ashrat3000
Member Avatar
u3d raytracer
[ *  *  *  *  *  * ]
I did.

It is changing, but just by such small amounts that it doesn't even matter or show up.




그대를 사랑해


Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
Well, this whole problem was because I did this for autoaiming in my gun object:

if abs(angle_difference(point_direction(x,y,enemy.x,enemy.y)-90,roty))<10

{roty=camera.roty+rotyaim

rotyaim=angle_difference(point_direction(x,y,enemy.x,enemy.y)-90,roty)/2}

(The aiming stops half-way and after that doesnt change at all)

Can anyone tell me why that won't work?
Edited by Eansis, Oct 14 2008, 01:07 AM.
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY

Til'c
 
Things will not calm down Daniel Jackson. They will infact calm up.
Offline Profile Quote Post Goto Top
 
Go to Next Page
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply