|
-
Instead of trying to fake the rotation, why not let the physics engine handle it for you? Simply make your projectile have some rotational inertia by making it have some length in the physic engine (make it a long box instead of a point or circle, or two joined points, or something like that). It may "just work" doing that. If not, you can probably get it to work by applying the launch forces to just one end of the projectile (the "front", I'd think). The other end should trail behind automatically. If that doesn't work, you could explicitly tell the physics engine that the projectile has some angular momentum, so it'll rotate during flight.
-
That's how it's designed now. Simply put, this engine doesn't seem to have the natural capability to do that.
I'm using a rectangle-shaped projectile, the code knows it is being fired at an angle, yet it lacks the ability to do to the curve. It remains at the same angle the entire time until it hits a surface, at which point it will change.
This is why I'm trying to force it.
Edit: Ok, turns out I'm a dummy, haha.
I forgot to convert the radians to degrees. Did that and it now looks like it's rotating. Also did some tweaking and it overall is fine. However...
As the angle for firing increases, the weirder the shell gets. If I fire it horizontally, it's fine. However, if I fire it at 15 degrees, it looks as if the the shell starts off pointing in the wrong direction. This is, of course, leading to it pointing downwards far sooner than it should.
Last edited by Skye McCloud; 06-20-2008 at 12:38 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|