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 (501 Views)
Bazza
Member Avatar
Forum God
[ *  *  *  *  *  * ]
wow
u have turned me on my head i thought 0 bieng undivisable was a sure thing
what is that fancy equation spos to do for the aiming?
My instinct is to hide in this barrel, like the wily fish.
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
On paper, it should make the gun smoothly approach the target, the closer to target the slower it approaches the target. I couldn't find any objects that were influencing the gun's rotation.

I know the angle_difference script works because it returns the correct angle difference between two angles.
Edited by Eansis, Oct 14 2008, 01:46 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
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
rotyaim=angle_difference(point_direction(x,y,enemy.x,enemy.y)-90,roty)/2}


You're approaching zero.
That's why. Graph the equation there.

I know what you're doing. I use that until I can put time - based interpolation.
Edited by skarik, Oct 14 2008, 02:20 AM.
Blog|EHS
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
skarik
Oct 14 2008, 02:19 AM
rotyaim=angle_difference(point_direction(x,y,enemy.x,enemy.y)-90,roty)/2}


You're approaching zero.
That's why. Graph the equation there.

I know what you're doing. I use that until I can put time - based interpolation.
Its supposed to approach zero. The roty should move halfway towards the target, each step. But it only does that on the first step. Why?

The equation is roty=camera.roty+rotyaim
Edited by Eansis, Oct 14 2008, 02:42 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
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
if abs(angle_difference(point_direction(x,y,enemy.x,enemy.y)-90,roty))<10

^

That's your problem.
Blog|EHS
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
No, that just determines if the target is in range. Has nothing to do with the problem. That part of the code works anyway.
Edited by Eansis, Oct 14 2008, 03:00 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
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
Well, I mean, if you're in range, it'll stop moving. I copied your code, and it works awesome.
Blog|EHS
Offline Profile Quote Post Goto Top
 
Eansis
Member Avatar
ghost
[ *  *  *  *  *  * ]
skarik
Oct 14 2008, 03:02 AM
Well, I mean, if you're in range, it'll stop moving. I copied your code, and it works awesome.
*Pulls out hair* That code only serves as a preliminary check to start the autoaim. Anyway, I will start from scratch sense you say my code works. I was gonna anyway anyhow.
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
[ *  *  *  *  *  * ]
Got it to work using the += instead of "=".
Edited by Eansis, Oct 14 2008, 03:45 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
 
skarik
Member Avatar
kitten eating scum
[ *  *  *  *  *  * ]
Lol.
Blog|EHS
Offline Profile Quote Post Goto Top
 
« Previous Topic · Questions about Ultimate 3D · Next Topic »
Add Reply