| 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: |
- Pages:
- 1
- 2
| Rotation weirdness; some dynamics weirdness | |
|---|---|
| Tweet Topic Started: Oct 13 2008, 08:52 PM (501 Views) | |
| Bazza | Oct 14 2008, 01:20 AM Post #16 |
|
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. | |
![]() |
|
| Eansis | Oct 14 2008, 01:34 AM Post #17 |
|
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
| |
![]() |
|
| skarik | Oct 14 2008, 02:19 AM Post #18 |
|
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 | |
![]() |
|
| Eansis | Oct 14 2008, 02:41 AM Post #19 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
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
| |
![]() |
|
| skarik | Oct 14 2008, 02:50 AM Post #20 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
if abs(angle_difference(point_direction(x,y,enemy.x,enemy.y)-90,roty))<10 ^ That's your problem. |
| Blog|EHS | |
![]() |
|
| Eansis | Oct 14 2008, 02:58 AM Post #21 |
|
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
| |
![]() |
|
| skarik | Oct 14 2008, 03:02 AM Post #22 |
|
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 | |
![]() |
|
| Eansis | Oct 14 2008, 03:04 AM Post #23 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
*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
| |
![]() |
|
| Eansis | Oct 14 2008, 03:43 AM Post #24 |
|
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
| |
![]() |
|
| skarik | Oct 14 2008, 04:37 AM Post #25 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Lol. |
| Blog|EHS | |
![]() |
|
| « Previous Topic · Questions about Ultimate 3D · Next Topic » |
- Pages:
- 1
- 2





![]](http://z1.ifrm.com/static/1/pip_r.png)



2:47 AM Jul 11