3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1] 2

Author Topic: Turret controlled by mouse  (Read 3020 times)

« on: November 01, 2009, 01:13:23 PM »
Hi everybody!

First of all, I have to say that 3Drad is one of most impressive piece of software I've ever seen. So much power is packed in such a small file size. It caught my attention when it became free and I got hooked and I decide to try to make my first game. I've been following this forum on everyday basis ever since, trying to learn as much is possible before asking first question.

I want to make naval sim game and for that I need turret with gun controlled by mouse: mouse left and right controlling the azimuth of turret while up and down controls gun elevation. I've managed to make azimuth control but gun elevation control is givin' me the headache. Look at attached file and you will see what I mean.
I assembled them on a car object because it's easier for upload but principle are the same for my ship turret.

Maybe, if I may suggest, turret can be made as standard rigidbody object controlled by mouse. You simply drop them to any other object like car, boat... and you have instant tank, battleship etc.

I'm trying to learn scripting but it is hard for me because my english is not that good and it's hard for me to understand some of the functions. Mike has started nice scripting school in one of the forum threads but unfortunately ended to soon for me.

Anyway thanks in advance for any help.

PS. Mike, thank you for your infinite ocean plugin and your submarine looks absolutely amazing. It's your work and cool_blue_sapphire's ships that hooked me to 3Drad.

« Reply #1 on: November 02, 2009, 02:16:04 PM »
Hi everybody,

Well, I made some progress on making my turret. I've managed to control both azimuth of turret and elevation of gun with mouse but both turret and gun behave rather quirky, especially gun. I think that I can't solve that problem but for me this is already big achievement. Also I added a targeting camera but without zoom at this moment. See for yourself.

I hope that someone else have another approach to my problem.   
« Reply #2 on: November 02, 2009, 02:26:51 PM »
It runs smoothly for me. And the targeting camera is real cool  :)
« Reply #3 on: November 02, 2009, 03:04:22 PM »
Cool demo!
FPS game creator for 3drad and >2000 games GamesAtNight
« Reply #4 on: November 02, 2009, 03:36:41 PM »
Hi everybody,

Fernando, by quirky movemement I mean that when you rotate turret, gun follows as it should be, but when you stop rotating the turret, the gun still moves for a few degrees in same direction and then turn backwards and then stops where it should be. Both turret and should be firmly attached to car and to each other so there shouldn't any post movement.

And one more thing is problem to me. How can I restrict movement of a gun in interval let say -10 +60 degrees. Limiting joint angular limits doesn't work.

And for a fun I added few things so you should try to shoot ball while driving around. This is first 3Drad armored beetle. BEWARE!

« Reply #5 on: November 02, 2009, 04:06:26 PM »
Because the Projectile object can be attached to a SkinMesh, you could avoid using RigidBodies for the turret+cannon. This would have two advantages

1. the iObjectOrientationSet() functions would work instantly

2. you wouldn't have to use Joints, that can make the system more complex than needed (probable cause of delayed response).

The drawback would be that setting up a turret and a cannon as distinct objects may not be as easy.

« Reply #6 on: November 03, 2009, 03:10:59 PM »
Hi everybody,

I've used RigidBodies because they can be connected with joints and I thought that this would be the easiest way to construct turret with multiple parts. One more thing is that you can detect collision (bullet hit turret) with RigidBodies which you can't do with SkinMeshes. Anyway, I'll take Fernando's proposition into consideration (which mean try to learn and understand scripting functions) and I'll try to do my turret in that way.

I have more ideas of how to do turret with joints and Rigies but I'm always stuck with scripting. Oh, I wish that Mike would continue his scripting tutoring.

And I would like to see some other guys solutions to that matter.

Anyway, thank you all for your help and nice comments. I'm going to dive into scripting and try to learn RADish as best as I can do.

Be back when I have something useful to show or discuss...
« Reply #7 on: April 08, 2010, 10:14:16 AM »
HEY MAN! i know this is dead but if you see please think about: add an real tank shot with RMB so there is a gun and missle launcher in the tank, isnt a good idea?

System Specs: Win7 - Intel Core Duo 1.80GHz - 2gbRAM - 232gb
Molten Games - moltengames.webs.com
« Reply #8 on: May 02, 2010, 02:32:29 PM »
Hi everybody,

it's been a while since I started this subject and many variants has been produced in the meantime. I've seen some of them and they are all keyboard controlled. I've decided to take a break from modeling and to try to find another solution for my mouse controlled turret. And here is my another try. I've decided to control rigidbodies through joint spin control and it worked. Turret and gun is now stable at any orientation although I have a feeling that my first solutions were more fluid to control. I guess that I need to do little bit more tweaking.

Here is a project and what I've been modeling last few months.


« Reply #9 on: May 02, 2010, 03:51:48 PM »
Great Job. What are you going to do next? Enemies?
3Drad Version: 6.51, and 7.11

System Specs:
MS Windows 7 Home Premium 64-bit
AMD Athlon Neo X2 Dual Core Processor L335, 4.0GB RAM
ATI Radeon HD 3200 Graphics
250 MB Hardrive
HP Pavillion dm3 Laptop

Total Donation Amount:$24

Location: Edmonton, Alberta

Email: [email protected]
« Reply #10 on: May 03, 2010, 12:32:07 PM »
i have been working on something simalar its a replica of the worthog form halo here is a link to the project post http://www.3drad.com/forum/index.php?topic=2817.15;topicseen

enjoy
« Reply #11 on: May 11, 2010, 02:34:38 PM »
Quote
What are you going to do next? Enemies?

Well, I am far from that. This is my first model made for rendering and as such it has way too much polys for a game (although, it runs perfectly in 3Drad at a present step). So, at the moment I am trying to lower the polycount as lower as I can. Next step is texturing and then I will make other parts of my project. Time is what I'm missing mainly.

Blueman64

Yes it is similar and your warthog looks amazing, but I need to control two rigies with mouse while for your project one was enough.

Well, for a moment, I'm going back to modeling. Turret I've made is satisfying for a moment and if someone else comes up with a better one, I'll be glad to look into it.
« Reply #12 on: May 11, 2010, 08:47:28 PM »
What program do you model with? Blender? Because if you do, there's this very nifty little tool called re-topologizing; you remove many of the polys while keeping most of the detail. It's very helpful to people when they need to reduce poly levels, like you're going to have to if you ever want to implement enemies easily.
Have a 3DRad problem? There's a topic for that.
(And if there's not, you can always make one.)
My project: http://www.3drad.com/forum/index.php?topic=4337.0
« Reply #13 on: May 12, 2010, 05:50:42 AM »
I am using trueSpace 7.6. I have tried several poly crunching tools but none of them seem right. I have pretty geometrically shaped model and it is hard to do that automatically. It is far better to manually replace cylinder with 16 sides with cylinder with 6 sides.
Anyway, I have managed to load my model in blender and will look into retopologizer you suggest.

Thx
« Reply #14 on: May 12, 2010, 12:02:57 PM »
Have a 3DRad problem? There's a topic for that.
(And if there's not, you can always make one.)
My project: http://www.3drad.com/forum/index.php?topic=4337.0
Pages: [1] 2